下述程序演示了一些转义序列。它使用振铃字符来提请注意,使用换行符使光标前进,使用退格字符使光标向左退一格
void bodini(void)
{
cout<<"\aOperation \"HyperHype\" is now activated!\n";
cout<<"Enter your agent code:_______\b\b\b\b\b\b";
long code;
cin>>code;
cout<<"\aYou entered "<<code<<"...\n";
cout<<"\aCode verified! Proceed with Plan Z3!\n";
}