Executing, Copying, and other tasks in C++

E

Erhan

Hello, after a recent move to windows API from terminal I come across
a small problem. How can I execute a program without using stdlib.h ?
Before I would use stdlib.h by using a command such as
system("myprogram.exe");
to execute a program. When using windows API the terminal window pops
up and carries out the command in the terminal. This looks ugly, and I
am looking for an alternative to executing a program without the use
of terminal commands.

Thanks, this will be extremely useful for my transition.
 
M

Mike Wahler

Erhan said:
Hello, after a recent move to windows API from terminal I come across
a small problem. How can I execute a program without using stdlib.h ?

With ISO standard C++ (the only topic here), that's
the only way.
Before I would use stdlib.h by using a command such as
system("myprogram.exe");
Right.

to execute a program. When using windows API the terminal window pops
up and carries out the command in the terminal. This looks ugly, and I
am looking for an alternative to executing a program without the use
of terminal commands.

The Windows API does offer more flexible, Windows-oriented
ways of spawning and executing a one program from another,
but the Windows API (or any other platform-specific feature
or tool) is not topical here. I think you can find all the
answers you need at www.msdn.microsoft.com and/or one or more
of the many Windows-specific newsgroups which are cited there.

The MDSN site can appear rather formidable to the first time
visitor, but imo it's worthwhile to persevere until one can
learn his way around there. There's a *huge* amount of good
Windows programming info there.


Good luck!
-Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top