Hello everyone, I've been using this website and it has helped me with it's hundred of solved cases, but I couldn't find one appropriate for this one.
I have created a Menu() function that looks like this:
int Menu()
{
int i;
printf("MENU\n\n");
printf("1 - ...\n");
printf("2 - ...\n");
printf("3 - ...\n");
printf("4 - ...\n");
printf("5 - ...\n\n");
printf("Choose: ");
scanf("%d",&i);
printf("\n\n");
return i;
}
And I have been calling it using this on main():
void main()
{
int op;
op = Menu();
switch(op)
{
case 1:
funct1();
break;
case 2:
funct2();
break;
case 3:
funct3();
break;
case 4:
funct4();
break;
case 5:
funct5();
break;
default:
printf("ERROR: Invalid.\n\n");
break;
}
}
It works great, no problems at all. I just wanted to know how to, if possible, return to the Menu() after funct1() has ended, for example.
Thank you! :)