Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C++ Clear Screen Code- Please Help

Status
Not open for further replies.

Luckygold6

Programmer
Jan 9, 2003
31
US
See topic. Thank you in advance.
 
You can try something like this:
void clrscr()
{
putchar(27);
fputs("[H",stdout);
putchar(27);
fputs("[J",stdout);
}
 
fputs() is similar to puts().
It writes the string (arg1) to the stream denoted by the file id (arg2).
 
You might want to look at MS Knowledge base article:

PSS ID Number: Q99261
Article Last Modified on 12-14-2001

MS furnishes some code for a clear screen that doesn't depend on the ANSI control codes being available. The console.h header is one of the things I miss from my old Borland compiler days. :)

DJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top