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.
Removing text from a commandwindow
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.
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.
Not so good for clearing the screen though.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement