vendredi 13 mars 2015

c++ linux output string overwrite last string on command line


Say I have a command line program. Is there a way so that when I say



std::cout << stuff


if I don't do a std::cout << '\n' in between another std::cout << stuff, another output of stuff will overwrite the last stuff on the same line (cleaning the line) starting at the leftmost column?


I think ncurses has the ability to do this? If possible, it would be great if I could say std::cout << std::overwrite << stuff


Where std::overwrite is some sort of iomanip




Aucun commentaire:

Enregistrer un commentaire