I am trying to develop a system that will allow me to compile a .exe that can run other programs I make. Right now, it can, but it can only run the external programs once. Everything runs in one cmd window. I type a command, it does the action(running a seperate .exe) then waits for a second action.
I'll try to simplify what I'm doing as much as possible.
The running .exe. Lets call it TheCauser.exe
int main()
{
.
.
.
if(stuff is met)
{
.
.
.
system(foundtextchar);//Windows run program
cout << endl;
}
}
The .exe to be run from the code above. Lets call it DoMe.exe
int main()
{
//It just does whatever
.
.
.
return 0;
}
Absolutely basic. Though things do run smoothly I can only run DoMe.exe and have the material appear on the cmd window once. Kind of. I have a small notification in TheCauser.exe that tells me when DoMe.exe is running. When I run DoMe.exe a second time that notification comes up but no material from DoMe.exe. My assumption is, that once DoMe.exe runs the first time, it never really closes but just continues to run.
I feel it's also important to mention, if I were to have a second program I wanted to run, lets call it, HeyListen.exe, if DoMe.exe was running earlier, HeyListen.exe would not show it's material but the notification would pop up saying it is running. HeyListen.exe would be built the same way as DoMe.exe.
I feel as if my problem is in DoMe.exe, in that, it doesn't end it's process the way I'm hoping it does. Is this correct? How could I get this to work?
I wanted to post a picture of the cmd window to help give a visual, but apparently I don't have enough reputation. Sorry.