Hello
Please tell me how can I used CLS in C++.. In any programm. ?

//ThisProgram is about CLS,A Command Prompot 
//Command used to Clear the screen

#include<iostream>
using namespace std;

int main()
{
    cout<<"Hello World!!";
    system("cls");
    cout<<"How Are You ";
    cin.get();
    return 0;
}

In linux you would use the "clear" command unless you create an alias for it.

This is highly dependant on the OS you're targeting and how you're interacting with the console. Anything beyond the standard streams is pretty non-portable unless you use an external library.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.