clear screen for microsoft visual 2010?

I checked through the net and most of the solution like clrcr(); is not working for microsoft visual 2010. SO i was wondering for those who was using the same ver of c++ as me how do you clear the screen?
for(i = 0; i < screenHeight; i++)
   std::cout << "\n";

Using standard C++ there isn't a way to clear the screen besides that. You can do it with system calls, but that's just silly. Do you actually need to clear the screen? I've never used a command-line program that ever needs to clear the terminal, and I would frankly be annoyed if it did. What if I had information there that I needed to record or keep track of?

I would bet you're trying to make a game, in which case go learn a graphics library. The terminal is not meant for a game. It's not the 1980s anymore.

Don't recommend people to use system().
Last edited on
try using

system( "cls" );
you can use a bunch of newline commands

It's not the 1980s anymore.

Too bad.. The eighties were awesome.
Topic archived. No new replies allowed.