📄 ioutils.h
字号:
#ifndef IOUTILS_H__
#define IOUTILS_H__
#include <iostream>
#include <string>
using namespace std;
/* 从cin读入一行文字
* 跳过行首空白, 确保返回值不为空字符串
*/
string getString();
/* 从cin读入一个bool值
*/
bool getBoolean();
/* 从cin读入一个int值
*/
int getInteger();
/* 从cin读入一个正整数值
*/
int getPositiveInteger();
/* 从cin读入一个double值
*/
double getDouble();
/* 在屏幕上打印 "Press any key to continue..."
* 并在等待用户按任意键后返回
*/
void pause();
/* 在cout打印链表
*/
template <class ListType>
void printList(ListType& list) {
cout << "List:\n";
ListType::Itor itor = list.begin();
for ( ; itor != list.end(); itor=itor->next)
cout << "\tData: " << itor->data << "\n";
cout << endl;
} // printList(const ListType&)
#endif // IOUTILS_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -