📄 utility.h
字号:
bool user_says_yes( )
{ char c;
bool initial_response = true;
do{ // Loop until an appropriate input is received.
if (initial_response)
cout<<" (y,n)? " <<flush;
else
cout << "Respond with either y or n: "<<flush;
do{ // Ignore white space.
c=cin.get();
}while(c == '\n' || c == ' ' || c=='\t');
initial_response=false;
}while(c!='y' && c!='Y' && c!='n' && c!='N');
return(c=='y' || c=='Y');
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -