Clear Screen | Sololearn: Learn to code for FREE!

+1

Clear Screen

Is there any other way to clean the console screen with out using the System("cls") function?

c++

6/14/2018 5:30:08 AM

Adugna.T

2 Answers

New Answer

+7

The console isn't part of the C++ standard, so clearing the screen is pretty much platform-dependent. https://stackoverflow.com/questions/228617/how-do-i-clear-the-console-in-both-windows-and-linux-using-c

+3

Example (In line 34): https://code.sololearn.com/cXmBP9p5Go8X/#cpp system("cls") (Windows) system("clear") (Linux)