Link to home
Start Free TrialLog in
Avatar of xandox
xandox

asked on

clear screen

The only way that I know how to clear a the MSDOS screen while executing a program is to print out a bunch of end lines.  Is there a better way to do this that will put the cursor back at the top of the screen when done?
Avatar of vsinha
vsinha

try:
#include <conio.h>
//...
clrscr();

let me know if you want further explaination
Why rejected? Doesn't work, or you didn't understand it?
Avatar of xandox

ASKER

I tried using the clrscr() from conio.h but I kept getting errors when I compiled saying that clrscr() was an undeclared identifier.

Am I missing anything else?

There is no standard way to do it. You must say what compiler you are using.
And which operating system, too. Are you talking about a console window in Win95 or Win98 or WinNT? Or are you talking about a DOS window on 16-bit Windows?

.B ekiM


ASKER CERTIFIED SOLUTION
Avatar of alexo
alexo
Flag of Antarctica image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Some additional comments:
* Don't forget to #include <wincon.h>
* PERR() is a user-supplied function or macro that is supposed to display an error.  Either remove all references to it or write it.  Otherwise the code will not compile.

A DOS window in Win16 is equivalent to a DOS application.

And the autograder hits again!