0

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.

2
Contributors
2
Replies
4
Views
13 Years
Discussion Span
Last Post by CPLUSCPLUS
0

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!!!!

0

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!!!!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.