clear screen

May 20, 2018 at 7:08am
does system("cls") have the same function of clearing the screen as the clrscr(); but each use a different header file?
May 20, 2018 at 7:41am
system("cls") runs the cls command. Note that cls does not exist on all systems so it is not portable. Linux for example uses clear instead of cls.

The clrscr() function is part of the non-standard header conio.h. It's not shipped with all C++ compiler so it's also not portable.

Clear the screen: http://www.cplusplus.com/articles/4z18T05o/
Last edited on May 20, 2018 at 7:42am
Topic archived. No new replies allowed.