quick question about C Dos text menu pgm i was doing
Hello all. I dont post much on here, but checked out the FAQs n things. I might look into that displaying graphics in dos matter ( dont know though, not tooooo important of an issue for a leisure program ).
As i said awhile back im creating a selection menu. It's devided into catagories. I want to know how to jump back to a certain spot in the code ) after running an outside exe.
example:
#include < stdio.h >
int main();
{
int mainmenu;
int submenu;
printf("Select a pgm\n\n1. defrag\n");
scanf("%d", &mainmenu);
switch(mainmenu)
{
case 1:
system("c:\\windows\\defrag.exe");
system("menu.exe"); /* open menu */
break;
default:
printf("Invalid selection");
break;
}
{
printf("Choose a pgm\n\n1. scandisk\n2. clean");
scanf("%d", &submenu);
switch(submenu)
case 1:
system("c:\\windows\\scandskw");
system(" THIS IS WHAT I NEED ");
break;
case 2:
system("c:\\windows\\diskclean");
system(" THIS IS WHAT I NEED ");
break;
}
return 0;
}
This was a very basic example as i dont want to load up this post with miles of code. Sorry for the long post. You see though, I have a main menu, this menu allows you to choose a program, or, go into a second menu with several programs on it. If the user chooses a pgm from the 2nd menu, after that pgm is done running i want to return them to the 2nd menu and not the entire beginning.
The pgm im working on is much larger, but i just need the basic idea and then i can put it in.