It is possible to clear the screen in a VC 6 console app using only iostream.h? If so, how? I've already tried counting and deleting lines, but it didn't do what I wanted. TIA
Printable View
It is possible to clear the screen in a VC 6 console app using only iostream.h? If so, how? I've already tried counting and deleting lines, but it didn't do what I wanted. TIA
the answer to this question is in the FAQ. Read kermi3's thread at the top of the forum!
:rolleyes:
The " conio.h " is not a standard header, therefor clrscr(); will not work because its not even defined in conio.h =) So... I don't think his question was answered correctly. I gave it a try in one of my programs and it doesn't work, all you will get is an error stating "clrscr(); not defined". There must be another header file that contains a function to clear the screen, if you find it...let me know =)
-MuDvAyNe
Yes, there's no standard way to clear the screen but the FAQ offers 7 alternatives, one of which will probably work.Quote:
The " conio.h " is not a standard header, therefor clrscr(); will not work because its not even defined in conio.h =) So... I don't think his question was answered correctly.
If you only want to use iostream then use option 2, but if you're using MSVC then you may aswell use the 'windows option'.
clrscr() is Borland I *think*, but I found the answer in one of MS's KB articles. Thanks to both Zen and TechPhreak for at least offering something. :)
system("cls");
clrscr() is not just Borland. It is also in DJGPP. I know, I've used it.