Right way to clear console screen

Hey I wonder how to clear a console screen for a frame update in tic tac toe or some kind of games ?
I know that system("cls"); /*or*/ system("clear"); is not good
and clrscr();doesn't work for me
then for(int i=0;i<10;i++)std::cout<<"\n\n\n\n\n\n" doesn't work as i expected
i heard somthing abour curse library but I don't know how to use it :( any other method to do this ? Or just tell me how to use this curse to clear screen,

Thanks :D
it doesn't interact well with the standard streams. In other words, you shouldn't mixprintf() and the like or cout and the like with Curses
aww..
LB what's your suggestion ? Should I stick with system()
Is there any other way to do this :( ?
The first link he posted shows you like 3 or 4 different ways.

Though my answer to this question would be: "don't". Console programs typically should not clear the console as it wipes history and that is annoying for people who actually use the console.
Last edited on
In my first post too
I know that console is bad for game and I have some game engine installed its much easier to use, but this just a challenge from a friend, to create a simple game with c++ in console window
You should point your friend to that article ;)
Ahaha great suggestion :D but still T.T
Your friend challenges you to build a small office building with dirt and rocks. Why do you feel disappointed that you cannot complete the task? You tried and learned a better way.
Last edited on
Thanks :') maybe I'll start to learn SFML
Last edited on
Topic archived. No new replies allowed.