a better way than "system ("CLS")"?

I'm working on a simple console program, and currently the only way I know of to clear the screen is with system ("CLS") , but I've been hearing that system commands are not good to use. Is there some relatively easy alternative?
if your intention is to do something more than a trivial console app, I recommend that you learn how to use ncurses

http://www.gnu.org/software/ncurses/

besides clearing the screen, you will be able to set colors, turn of echoing, write anywhere on the screen, create a simple character-based GUI, etc... ...all of which will run over ssh or rlogin since it unifies termcap - it's also available on almost any platform (having been around for so long)
... or you could use native winapi functions to do it, like always:
http://msdn.microsoft.com/en-us/library/ms682073%28v=VS.85%29.aspx
Topic archived. No new replies allowed.