如何退出循环switch语句中的函数
比如说
//在main中
while (1) {
switch (a) {
case 1:
cout << "--" << endl;
fun1();
continue;
case 2:
cout << "--" << endl;
fun2();
continue;
case 3:
cout << "--" << endl;
continue;
……
//在fun1中
while (1) {
switch (a) {
case 1:
cout << "--" << endl;
fun();
continue;
case 2:
cout << "--" << endl;
continue;
case 3:
cout << "--" << endl;
continue;
……
先输入1进入fun1,操作完成后我想退出fun1输入2进入fun2
怎么做