i want write simple c++/c console app, show process 1% 2%. now, print line line like finished 1% finished 2% and etc how can update percentage x% without printing new line? also, want open 2 console windows 1 show messages 1 show process above. how open console window? on most-all terminals, can print ascii carriage return '\r' (value 13 decimal) return cursor left of current line, allowing overwrite previous value. or, can send backspaces ('\b', ascii 8) move single character left. neither automatically remove content displayed, can overwrite no longer want see spaces. alternatively, can use control codes supported particular console (e.g. vt100, vt220...), have more advanced features such "clear-to-end-of-line". many libraries available detect terminal type , use codes supports, or synthesize advanced operations many simpler ones necessary: on linux , unix, ncurses library choice. c++ has no concept of console windows. opening sec...
Comments
Post a Comment