Equivalent of cls command in C++

Asked By 50 points N/A Posted on -


Is there any c++ equivalent of a "cls" command? I'm running my code as a console application. I would be very thankful if you could give me some information. 

Answered By 0 points N/A #141419

Equivalent of cls command in C++



There are two ways to clear your screen using the program. One is by pass the cls command itself the other is by using the existing function.

By passing the command.


This way you can clear the screen of your console.

By using the existing function.

Use clrscr(); function to clear the screen.

Both available methods are good enough to use in case of functionality and usability. The function is same for both of them.

The best practice of using this is by using in built methods rather than passing the command as an input.

Now it’s your choice what to use.

Login/Register to Answer

Related Questions