define# switch case
Posted: Sat Mar 17, 2007 9:12 am
I've defined some stuff in global code:
but when I try the code...
The compiler expects a ":" on the case lines.
Any feedback appreciated.
- Code: Select all
#define E 0;
#define N 90;
#define W 180;
#define S 270;
but when I try the code...
- Code: Select all
switch ( creator.myDirection )
{
case E: xvelocity = mySpeed; break;
case N: yvelocity = -mySpeed; break;
case W: xvelocity = -mySpeed; break;
case S: yvelocity = mySpeed; break;
}
The compiler expects a ":" on the case lines.
Any feedback appreciated.