So I had this crazy idea today that I want to turn on a program again after it finishes it's work or in any other part of its code. I already know that typing system("start notepad.exe); turns on notepad but system("start nameOfMyProgram.exe"); doesn't turn on my program. I get an error. Could anyone help me out with this? :D
When you use the start command, you have to specify the directory your file is in. Typing start notepad.exe works because the path environment variable for notepad.exe is already set.