| | |
System() Function: Info on uses & Description
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2004
Posts: 6
Reputation:
Solved Threads: 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.
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!!!!
(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!
•
•
Join Date: Dec 2004
Posts: 6
Reputation:
Solved Threads: 0
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
*******
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!!!!
![]() |
Similar Threads
- What is the function to recognize 8 & 9 as "8" & "9"? (HTML and CSS)
- system function in c++ (C++)
- problem with system() function... (C++)
- System function, output to file (C++)
- how to make utilize of system( ) function (C)
Other Threads in the C++ Forum
- Previous Thread: confused how to begin this program
- Next Thread: Character counting/usage (was: Need Help with my CODE!! PLEASE HELP....)
| Thread Tools | Search this Thread |
api array based binary c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock wordfrequency wxwidgets






