Can anyone tell me the code to call another program? Here's an example:
---
Enter selection: 1, 2, 3: 3 (when I enter 3)
the program will execute: notepad.exe ...etc.
Thanks.
Can anyone tell me the code to call another program? Here's an example:
---
Enter selection: 1, 2, 3: 3 (when I enter 3)
the program will execute: notepad.exe ...etc.
Thanks.
check the FAQ, under running execs.
http://www.cprogramming.com/boardfaq.html
ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.
Look these up in MSDN
system
_spawnl
CreateProcess
http://msdn.microsoft.com
Thank you. I think I found it, but it doesn't work when I try it. Do I do something wrong here?
When I execute the code, it said "bad command or file name". I believe it's the path that I use. Can you tell me how to use the path in the system(" "); ?Code:#include <stdlib.h> int main() { system ("c:\windows\notepad.exe"); return 0; }
ty
Last edited by Unreg1stered; 07-20-2002 at 11:58 PM.
instead of this:
try thisCode:system ("c:\windows\notepad.exe")
Code:system ("c:\\windows\\notepad.exe")
-