天天看點

\b的使用

#include<iostream>

using namespace std;

int main()

{   cout << "\aoperation \"hyperhype\" is now activated!\n";

    cout << "enter your agent code:______\b\b\b\b\b";

    long code;

    cin >> code;

    cout << "\ayou entered " << code << "...\n";

    cout << "\acode verified! proceed with plan z2";

    return 0;

}

将目前的輸出位置退回前一列處,即消除前一個已輸出的字元。