System() Function: Info on uses & Description

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2004
Posts: 6
Reputation: CPLUSCPLUS is an unknown quantity at this point 
Solved Threads: 0
CPLUSCPLUS CPLUSCPLUS is offline Offline
Newbie Poster

System() Function: Info on uses & Description

 
0
  #1
Dec 10th, 2004
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.
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4,002
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 927
Moderator
vegaseat's Avatar
vegaseat vegaseat is online now Online
DaniWeb's Hypocrite

Re: System() Function: Info on uses & Description

 
0
  #2
Dec 11th, 2004
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!!!!
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 6
Reputation: CPLUSCPLUS is an unknown quantity at this point 
Solved Threads: 0
CPLUSCPLUS CPLUSCPLUS is offline Offline
Newbie Poster

Re: System() Function: Info on uses & Description

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

Originally Posted by vegaseat
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!!!!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC