0
How do you put a > or < sign into a switch statement?
I'm trying to build a code like this but it isn't working: switch (a){ case > 95 : cout >> "bla" ; } Please help
2 Respostas
+ 1
You can't. Switch statements are not If-elseif-else blocks. The way they work is that a table of values will be created by the compiler and the code will look for each value within the table.
In other words, you can't do what you're trying to do.
0
thank you