0
Why switch case can't accept float value?
2 Réponses
+ 2
the problem with float are the rounding errors that would make a switch statement useless
on rounding:
https://randomascii.wordpress.com/2017/06/19/sometimes-floating-point-math-is-perfect/
0
It's not allowed, you have to type-cast to integer, or char. or any other type that switch support