Archived

This topic is now archived and is closed to further replies.

Infuscare

running a program from a program

Recommended Posts

If you want another method, you could create a new thread and then run it that way. On a unix machine, the call is execlp or something like that. There''s tons of stuff on the net about it.

Brad

Share this post


Link to post
Share on other sites
There is also what is called a "Script", where you run several executables within the main loop, without jeopardizing the initial program.

A Good scripting language is Python, Lua is also ok.

Share this post


Link to post
Share on other sites
What .h or .lib files do you need to use system(); ??

Im getting : C:\Cpp\bored3\main.cpp(94) : error C2065: ''system'' : undeclared identifier

I was thinking #include <windows.h> but its not working.

Share this post


Link to post
Share on other sites
for createprocess() or winexec() i imagine the program to run is the parameter...?

what about system, how does that work...
I know u can do system("pause") to pause, but can you
enter just any command that you could use at a command
prompt *wondering if pause is a command*, nehoo thx
was just curious...

i meant in C by the way...

Share this post


Link to post
Share on other sites
Umm I think that's defined in stdlib.h, by the way that's just like typing something into your DOS prompt that's why it works, though you have more control with CreateProcess() and if you want to find out how to use it look it up in MSDN.
And here's the one for WinExec

[edited by - FtMonkey on October 9, 2003 12:00:16 AM]

Share this post


Link to post
Share on other sites