+ 2
switch
is any limitation in switch in c++ i mean, can use switch for any data type (for example, string)? why i'm asking? because of this: error: switch quantity not an integer
2 Respuestas
+ 8
You can use with integral types or enumerated types. Remember the expression passed in switch need to result in a constant.