Pages

Categories

Archives

Objective-C Tip: Switch Statements

During one of my sessions of working on the iPhone game. I noticed something very strange within Objective-C. 1 2 3 4 5 6 7 8 switch(someVar) { case 1: int x = 5; // Expected expression before ‘int’   break; … } [...]