天天看点

\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;

}

将当前的输出位置退回前一列处,即消除前一个已输出的字符。