Because the compiler is doing an implicit (Automatic) conversion from the float to a integer. In this case the conversion is to "chop" off the decimal portion of the number and assign what is left to the integer.
If your compiler results in the value 10 being printed out, it is broken. (Of course, one might say it's already broken if it allows you to do the includes as you have.)
Of course, one might say it's already broken if it allows you to do the includes as you have
Or it was released before 1998 when namespaces were introduced and iostream.h became iostream. Turbo C++ is main example I often see still used.
Well, that does not make it more useful. So, to OP: update your compiler to something which wasn't made in previous millenium.