In a switch case does the quantity have to be an int?
In a switch case does the quantity have to be an int?
Keyboard Not Found! Press any key to continue. . .
It has to be an integral type or an object with a one step conversion to integral type. That doesn't necessarily mean int though, it could be char or long or an enumeration or a class with operator int overloaded. And so on and so forth.
My best code is written with the delete key.
Do you have to do something special to get it to work with a char?
Keyboard Not Found! Press any key to continue. . .
no. post some code.Originally Posted by DeepFyre
Code:switch( somechar ) { case 'a': ... case 'b': --- }