How to clear the screen in a WindowsNT / Linux - Console (C/C++)

Martin Henne
Thu Feb 10 08:52:00 GMT 2000

Does anybody know how to clear the
screen and set up the cursor to the
upper left position?

The Escape-code I used sometimes
in Windows 95/98 

   cout << "\x1b[2J";

doesn't work with Linux and
Windows NT. It works just if I set up
the 'ansi.sys' in the config.sys of


Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list