simple question about cout

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Atemporal

    simple question about cout

    When using cout, I can use \b to go back one character in the same
    line,
    How can I go back to last line to output something in a easy way?
  • Alan Johnson

    #2
    Re: simple question about cout

    Atemporal wrote:
    When using cout, I can use \b to go back one character in the same
    line,
    How can I go back to last line to output something in a easy way?
    C++ doesn't have any standard features for controlling output in that
    manner. You'll need to use some OS specific mechanism. For Unix/Linux
    systems ncurses is popular. For Windows you'll want to look at the
    Win32 Console functions (searching for WriteConsoleOut put on MSDN should
    get you to roughly the right place). There is also an ncurses for
    Windows.

    --
    Alan Johnson

    Comment

    Working...