944,123 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 12707
  • C++ RSS
Dec 10th, 2004
0

System() Function: Info on uses & Description

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
CPLUSCPLUS is offline Offline
6 posts
since Dec 2004
Dec 11th, 2004
0

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

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!!!!
Moderator
Reputation Points: 1333
Solved Threads: 1404
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004
Dec 13th, 2004
0

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

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

Quote 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!!!!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
CPLUSCPLUS is offline Offline
6 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: confused how to begin this program
Next Thread in C++ Forum Timeline: Character counting/usage (was: Need Help with my CODE!! PLEASE HELP....)





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC