Sign in to follow this  
KanTeH

Removing text from a commandwindow

Recommended Posts

Is there a easy way to clear a consolewindow then with "\n" ?

I would like to read backwards and even to remove lines from it.

There must be away since i remember an consolewindows with a rotaiting "-\|/"
star.

Share this post


Link to post
Share on other sites
For clearing console window you can use system("cls") for windows and system("clear") for linux. Manipulating console programmatically in win32 you can read here and for linux I think you can google about ncurses lib and how to use it.

Share this post


Link to post
Share on other sites
If you want to draw a rotation \|/, just count / printf "X\b" where 'X' is the character to print. \b is the escape code for "backspace" which will move the cursor left one character after printing, so you can then print another character over it.

Not so good for clearing the screen though.

Share this post


Link to post
Share on other sites

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