:confused: :confused: Is there a "select case" and "case..." thing in c++?
thx:D [COLOR=skyblue][COLOR=skyblue][COLOR=skyblue]
Printable View
:confused: :confused: Is there a "select case" and "case..." thing in c++?
thx:D [COLOR=skyblue][COLOR=skyblue][COLOR=skyblue]
Here is an example
Code:switch(expression)
{
case ValueOne: statement;
break;
case ValueTwo: statement;
break;
default: statement;
}
There ya go.
:p :p :p :p :p :p :p :p :p :p :p :p :p :p
Yep it works, thanks a lot ;) ;) ;) ;) ;) ;) ;) ;) ;) ;) ;) ;) ;) ;)
Make sure you remember to put a break statement after each case. If you don't then the code for every case after the one that was true will be executed, which is usually a fairly bad thing :)
Ok cool. thanks a lot.:)