?? fungetch.cpp
字號:
//這個程序在本書所帶軟盤中,文件名為fungetch.cpp
//這個子程序演示利用getch()或getche()來接受用戶的菜單選擇項目。
/************* 子程序 menu() ***********************************/
int menu(void) //在屏幕上顯示菜單
{
int select;
clrscr(); //清屏
cout <<setw(40) << "打入 a 執行選擇項目1" << endl;
cout <<setw(40) << "打入 b 執行選擇項目2" << endl;
cout <<setw(40) << "打入 c 執行選擇項目3" << endl;
cout <<setw(40) << "打入 q 退出程序執行 " << endl << endl;
cout <<setw(40) << "請打入你的選擇項目: ";
select = getch(); //或 select = getche();
return select;
} //子程序menu()結束
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -