Skip to main content
editted to emphasise the better solution - highlighted by another user
Source Link

EDIT: After a comment by @ChristianIvicevic I felt compelled to reword my answer to emphasise that the Article link I provided is a far better alternative to using a system call as it is more secure and does not risk producing false positives with anti-virus software.


Try and use athis Microsoft solution:

Performing Clear Screen (CLS) in a Console Application

A system function to call clear screen on your application can work too but carries the risk of producing errors with anti-virus software as it is a low-level system call.

#include <stdlib.h>

void main()
{
   system("cls");
}

If this doesn't work you can use the Microsoft solution:

Performing Clear Screen (CLS) in a Console Application

Try and use a system function to call clear screen on your application.

#include <stdlib.h>

void main()
{
   system("cls");
}

If this doesn't work you can use the Microsoft solution:

Performing Clear Screen (CLS) in a Console Application

EDIT: After a comment by @ChristianIvicevic I felt compelled to reword my answer to emphasise that the Article link I provided is a far better alternative to using a system call as it is more secure and does not risk producing false positives with anti-virus software.


Try and use this Microsoft solution:

Performing Clear Screen (CLS) in a Console Application

A system function to call clear screen on your application can work too but carries the risk of producing errors with anti-virus software as it is a low-level system call.

#include <stdlib.h>

void main()
{
   system("cls");
}
Source Link

Try and use a system function to call clear screen on your application.

#include <stdlib.h>

void main()
{
   system("cls");
}

If this doesn't work you can use the Microsoft solution:

Performing Clear Screen (CLS) in a Console Application