B
Bugs
I'm very new to C and am having a hard time figuring out how to pass a
command to the underlying OS so as it doesn't keep the console window
open. By double-clicking from Windows Explorer, I want the other
process to just spawn and the console to close.
For example, on Windows XP, I make the following call:
system(my_command);
where my_command = 'my_program.exe'.
But in Windows the console window stays open until my_program.exe exits.
I guess that makes sense but how would I change my_command or is there
an alternative to system() that would spawn a new process and then
immediately return so my application can complete and close the console?
I tried 'my_program.exe &', but that didnt work either.
Thanks!
command to the underlying OS so as it doesn't keep the console window
open. By double-clicking from Windows Explorer, I want the other
process to just spawn and the console to close.
For example, on Windows XP, I make the following call:
system(my_command);
where my_command = 'my_program.exe'.
But in Windows the console window stays open until my_program.exe exits.
I guess that makes sense but how would I change my_command or is there
an alternative to system() that would spawn a new process and then
immediately return so my application can complete and close the console?
I tried 'my_program.exe &', but that didnt work either.
Thanks!