printf backspace

whatz the equivalent of
printf("%3d\b\b\b");

in vs2005

thanks


Answer this question

printf backspace

  • Olegam

    I presume you mean with C++/CLI because:

    printf("%3d\b\b\b");

    Is still accepted by Visual C++ 2005. The escape character '\b' appears to work the same for managed code:

    #include <stdio.h>

    using namespace System;

    int main()
    {
       printf(
    "%3d\b\b\b"
    , 123);
       Console::Write(
    "{0}\b\b\b"
    , 456);
       Console::WriteLine(789);
    }


    When compiled and executed this program produces:

    789



  • printf backspace