The function clrscr() is not recognised by my C++ compiler. I tried to include the file that defines this function (forgot the name) but it doesn't work. I'm working with MsDev C++ 6.0. Please help!
Printable View
The function clrscr() is not recognised by my C++ compiler. I tried to include the file that defines this function (forgot the name) but it doesn't work. I'm working with MsDev C++ 6.0. Please help!
clrscr is not standard so it will not work on all compilers.
This will help you do that:
FillConsoleOutputAttribute()
Other functions you need for working with consoles are listed here:
http://msdn2.microsoft.com/en-us/lib...73(VS.85).aspx
--
Mats
FAQ on "How do I clear the screen" (bottom suggestion shows Windows code to clear the console).
FAQ using console functions
--
Mats
I'd buy a better C++ book. If yours is teaching you about clrscr(), it's probably going to teach you a lot of other non-standard crap. Is this a Turbo C++ book by any chance?
You have hardly "completely" learned the language if you thought clrsrc() was standard. There is no substitute for a good C++ book. Try "Thinking in C++" by Eckel - it's free to download.
In fact, I doubt many have "completely" learned the language. I know I haven't.