casting in C and C++ is to take an object of one type and turn it into another type. For your own classes you'd have to write the functionality yourself, but for simple primitives like int, it's part of the language.
To cast an int x as a double, you can use the C style: (double) x
or the (safer) C++ style static_cast<double> (x)
1 2 3 4 5 6 7 8 9 10
int x = 7;
double y0 = 8/x;
double y1 = 8/static_cast<double> (x);
cout << "y0 = " << y0 << std::endl << "y1 = " << y1 << std::endl;