How do you erase the screen??!?
I have been writing some small C++ programs lately(such as tic,tat,toe, etc) and I was curious if there was a function avaible to erase all the data viewed in the comand prompt. In my games the board or game would just re-display everytime which has just been getting annoying. So any help would be appreciated. THANKS :)
Standard C++ has no functions to do such a thing. You can use platform specific functions to do so (assuming your platform supports such a thing) or possibly use a console based library to do the same thing (ex: pdcurses).
Quote: Original post by Driv3MeFarYou can, but that's a horrible, horrible way to do it.
You can use system("cls") on win32.
Quote: Original post by Evil SteveQuote: Original post by Driv3MeFarYou can, but that's a horrible, horrible way to do it.
You can use system("cls") on win32.
I never said it wasn't, its just a possible solution.
June 13, 2006 09:01 AM
In Win32 console programs, the following are useful...
SetConsoleCursorPosition
FillConsoleOutputCharacter
FillConsoleOutputAttribute
SetConsoleCursorPosition
FillConsoleOutputCharacter
FillConsoleOutputAttribute
Hey Thanks guys for all the replies. But what the first guy posted was exactly what I was looking for.
I saw that post earlier but I couldnt find it and couldnt remeber the title so I just posted a thread of my own.
EDIT: Except I have come across a new problem. I'm using Visual Studio 2005 EE edition and It cant find the window.h file. Is there a package or something I could download and if so how do I install it?
[Edited by - PB Baller27 on June 13, 2006 9:27:00 AM]
I saw that post earlier but I couldnt find it and couldnt remeber the title so I just posted a thread of my own.
EDIT: Except I have come across a new problem. I'm using Visual Studio 2005 EE edition and It cant find the window.h file. Is there a package or something I could download and if so how do I install it?
[Edited by - PB Baller27 on June 13, 2006 9:27:00 AM]
June 13, 2006 10:28 AM
you need to install the Platform SDK if you are using VS EE and programming native win32 apps
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement