Shell Commands

J

ja

How do you create shell (eg. MS-DOS) commands in C++. I need a program
that will accept command line arguments (argv) and use them in a shell
command.

Any Ideas?
James
 
K

Kai-Uwe Bux

ja said:
How do you create shell (eg. MS-DOS) commands in C++. I need a program
that will accept command line arguments (argv) and use them in a shell
command.

In simple cases, you can execute commands using std::system(). Also, this is
the only command that standard C++ has for this purpose. Your platform may
have better options.


Best

Kai-Uwe Bux
 

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

Forum statistics

Threads
473,771
Messages
2,569,587
Members
45,097
Latest member
RayE496148
Top