Well g++ didn't like it either:
I suppose I could break it up by inserting some more switches like this?error: duplicate case value
Or is there a way to turn off the "strict" mode in g++?Code:switch(mycase){ case 0: { code for case 0; } break; case 1: case 2: { common code for case 1 and 2; } break; } switch(mycase){ case 2: { code only for case 2; } break; }




Reply With Quote