mytroubles.h
来自「一本语言类编程书籍」· C头文件 代码 · 共 29 行
H
29 行
// MyTroubles.h Exception class definition
#ifndef MYTROUBLES_H
#define MYTROUBLES_H
// Base exception class
class Trouble {
public:
Trouble(const char* pStr = "There's a problem");
virtual ~Trouble();
virtual const char* what() const;
private:
const char* pMessage;
};
// Derived exception class
class MoreTrouble : public Trouble {
public:
MoreTrouble(const char* pStr = "There's more trouble");
};
// Derived exception class
class BigTrouble : public MoreTrouble {
public:
BigTrouble(const char* pStr = "Really big trouble");
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?