Safe alternative to system("cls")?

Ive heard that using system anything is a terrible habbit to get into. So if i want to clear the screen what would you suggest using?
http://www.parashift.com/c++-faq-lite/clear-screen.html

... which is to say, you might as well stick to system("CLS"); if you truly need it.
Last edited on
This one isn't mine but it's a very useful article that covers a number of platforms: http://www.cplusplus.com/articles/4z18T05o/
i feel like i would be overusing it. I dont truley need it but im designing a text based game to practice classes, switch, loops, booleans, and if/else/ifelse's
after every entry i would like it to clear the screen and move to the next menu.
Honestly if this is part of a bigger project then don't even worry about it. If you've looked at the article I linked to you'll see that for a beginner some of the methods are projects in and of themselves, so don't get hung up on this petty detail. If it's bothering you that much then write your game first and include a function called "clear()" or something simple, inside of that use the system call but come back to it once you're happy with the rest of your project.
Topic archived. No new replies allowed.