SETHA SITE INFORMATION

  • Increase font size
  • Default font size
  • Decrease font size

How to Clear Screen in C++?

E-mail Print PDF
This article shows C++ code to clear screen.
  • Use header file: #include<stdlib.h>
  • Use function: system("cls")
Example:
#include<iostream>
#include<stdlib.h>

using namespace std;

int main()
{
    cout<<"Hello world!";
    system("cls");
    cout<<"Hi World!";
    return 0;
}