+ 8
What is the use of system("cls"); function?
6 ответов
+ 11
OS dependant (Windows) cmd to clear console screen.
+ 10
@Gaurav I believe clrscr() function relies on <conio.h> which is now obsolete in most compilers.
+ 8
Is this also can be used as CLRSCR(); ?
+ 4
normaly cls == clear screen
+ 4
For linux, you may use system("clear") ;
I use system("cls") along with goto (primitive combo) to make something like a refresh option. Whenever the user presses the assigned key, the screen is cleared and only the useful part is shown.
Helps create a page like feel, when I use a while loop along with some if elses...
Though this Idea can be considered obsolete by many as I use goto (which is deprecated)...
+ 2
system cls clears the screen and then goes to the next statement in the program.