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
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
I haven't used a compiler in ages, so please be gentle as I try to reacclimate myself. :P
the answer to this question is in the FAQ. Read kermi3's thread at the top of the forum!
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
I haven't used a compiler in ages, so please be gentle as I try to reacclimate myself. :P
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.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'.
zen
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.
I haven't used a compiler in ages, so please be gentle as I try to reacclimate myself. :P
system("cls");
clrscr() is not just Borland. It is also in DJGPP. I know, I've used it.