Say I have this:
cout << 10.2 + static_cast <int> (18.2) / 4;
So the output will be 14.2, but what will the data type be? float or double?
Learning C++ is a lot of fun, but I'm a little confused on this one... since the numbers aren't variables that have a predefined type, I don't know what the data type is for the output.
Thanks for any help you can provide.
cout << 10.2 + static_cast <int> (18.2) / 4;
So the output will be 14.2, but what will the data type be? float or double?
Learning C++ is a lot of fun, but I'm a little confused on this one... since the numbers aren't variables that have a predefined type, I don't know what the data type is for the output.
Thanks for any help you can provide.
