Search code examples
cnetbeanscygwin

How to clear console in C on Windows using Netbeans+ Cygwin?


I have searched on the Internet but most of the answers suggest using library conio.h which is not available. Can anyone give me answer for this question. Thanks in advance.


Solution

  • If you are on Windows

    system("cls");

    If you are on Linux/unix

    system("clear");