Sign in to follow this  

How do you erase the screen??!?

This topic is 4204 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 :)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
http://www.gamedev.net/community/forums/topic.asp?topic_id=395538

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
Quote:
Original post by Evil Steve
Quote:
Original post by Driv3MeFar
You can use system("cls") on win32.
You can, but that's a horrible, horrible way to do it.


I never said it wasn't, its just a possible solution.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
In Win32 console programs, the following are useful...
SetConsoleCursorPosition
FillConsoleOutputCharacter
FillConsoleOutputAttribute

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
you need to install the Platform SDK if you are using VS EE and programming native win32 apps

Share this post


Link to post
Share on other sites

This topic is 4204 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this