The System () function call is in C and C++, but I can't seem to find out just
exactly what it can do. I use "C++ How to Program", by Deitel and Deitel, but it's silent on the application of System(). Any help would be appreciated.
Thanks.

PS:
For example, I stumbled on this application:
system ("pause") // causes program to pause before a return to keep interactive text on the display screen.

With system() you can access any old DOS command
(if you are using Linux, any old Unix command).

#include <stdlib.h>
...
system("CLS"); // the much debased clear screen
system("PAUSE"); // wait, the hard way
system("DIR"); // list the directory
... and so on!

Not recommended if you want to have portable code!!!!

vegaseat,
Thanks for your datapoint! It sheds much light on the subject to an old :D 'dos' user. Also, can you tell me where this data is documented?
Thanks again, and have a great and safe holiday season.
CPLUSPLUS
*******

With system() you can access any old DOS command
(if you are using Linux, any old Unix command).

#include <stdlib.h>
...
system("CLS"); // the much debased clear screen
system("PAUSE"); // wait, the hard way
system("DIR"); // list the directory
... and so on!

Not recommended if you want to have portable code!!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.