I`m a beginner in C++ so if someone could give me an example with very simple code this would be really appreciated.
I want to do this:
int main()
{
function one();
sleep 2000;
system("start SOMETHING.exe");
//when SOMETHING.exe closes
function two();
return 0;
}
Call a function, wait a 2 seconds for it to complete and change a few files. Start a exe file. And when the exe file closes it will call the second function. And finally close the exe I'm going to compile with the above code.
Can this be done with simple c++ code? How do I wait for Something.exe to close?