Monday, 22 June 2009

Clearing screen using GCC or G++

When you use the conventional compilers such as TurboC, you can use the conio.h function clrscr(). But when you're using GCC or G++, we can't go with clrscr(). Hence try theses
for windows - system("cls");
for unix, linux and others - system("clear");

1 comment:

Grey said...

It has been said on many websites that using system("clear"); or system("cls") depending on OS is bad procedure and many antivirus programs will respond to such methods as if it were malicious code, is there an alternative to the system method using g++ compiler.