0
Casting
int main() { int a=1.5; cout<<static_cast<float>(a); return 0; } I think the output is 1.5, but not. Why,plz?!
1 Réponse
+ 1
Hi!
You declare a = 1.5 as an integer but it is already float?
Integers are 0, 1, 3, 4, 5, ......
int main() { int a=1.5; cout<<static_cast<float>(a); return 0; } I think the output is 1.5, but not. Why,plz?!