12345678910111213141516171819202122232425
printf("foobar"); char ch = _getch(); switch (ch) { case '1': { Menu1(); MainMenu(); }break; case '2': { Menu2(); MainMenu(); }break; case '3': { Menu3(); MainMenu(); }break; case '0': { Quit(); }
1234567891011121314151617181920212223242526
void Menu1() { system("cls"); printf("foobar"); char ch1 = _getch(); switch (ch1) { case '1': { PrepChan = 1; PrepareChannel(); }break; case '2': { PrepChan = 2; PrepareChannel(); }break; case '3': { }break; case '0': {break; }break; } }
default:{Menu1();}
12345678910111213141516
bool finished = false; while(not finished) { finished = true; char answer = /*...*/; switch(answer) { case '1': //... break; case '2': //... break; //... default: finished = false; } }