I wonder if it would not just be simpler to write:
Code:switch(mycase){ case 0: { /* code for case 0; */ } break; case 1: case 2: { /* common code for case 1 and 2; */ if (mycase == 2) { /* code only for case 2; */ } } break; }
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 9 of 9
Thread: switch with repeating cases?Threaded View
|
Click Here to Expand Forum to Full Width |