0

hi

can anyone tell me what do we mean by:

system( "PAUSE" );

and

system( "CLS" );


in C++

thanks

5
Contributors
5
Replies
10
Views
9 Years
Discussion Span
Last Post by Lance Wassing
0

hi

can anyone tell me what do we mean by:

system( "PAUSE" );

and

system( "CLS" );


in C++

thanks

system("PAUSE"); the program waits for you to enter a key
system("CLS"); clears the console or command line terminal

both of makes your program not portable since is operating system
depended

0

Well, the System("pause"); actually a function to the main windows shell, which calls pause.exe, and thereby pauses your program. And just to let you know, the System("PAUSE") method is a bad way of pause your applications...

A good alternative is at:
http://cpp.codenewbie.com/articles/cpp/1437/systemPAUSE-Page_1.html


As for System("CLS") function, it clcears your console applications screen. Basically erasing any user or application genereated output on the screen.

Please let me know if this helps you.

Thank,
Lance Wassing

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.