Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren0
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 Antwort
+ 1
Hi!
You declare a = 1.5 as an integer but it is already float?
Integers are 0, 1, 3, 4, 5, ......