Posted by Scott Bartlett on September 27, 2001 at 17:18:19:
In Reply to: integer and double adding posted by Gustavo Moura on September 26, 2001 at 15:37:42:
Questions such as this one can easily be answered by writing a short program. The 30 seconds it takes you to write:
cout << int(3) + double(3.5) << endl;
is far less time than it would take to look it up online/ in a book/ in the notes.
: When I add a double and an integer, for example 1.5+2, does anyone know if the result will be given as a double (3.5) or an integer (3)??
: it doesn't say anywhere in the text notes whether or not C++ actually makes such convertion... thanks!
Post a Followup