【发布时间】:2020-06-20 12:44:07
【问题描述】:
我想编写一个涉及打开菜单的 C++ 程序。
void mainmenu(){
//some code
if (a==1){return menu2();}
}
void menu2(){
//some code
if (b==1){return menu3();}
}
void menu3(){
//some code
if (c==1) //from here, I want to return to the main menu(restart the program)
}
int main(){
mainmenu();
}
有没有办法从menu3返回主菜单? 谢谢。
【问题讨论】: