📄 hour08_2.hpp
字号:
// you will need to rename this file to cat.hpp
// GetAge has been declared const, that it will not change anything
// in the object
#include <iostream>
class Cat
{
public:
Cat (int initialAge);
~Cat();
int GetAge() const { return itsAge;} // inline!
void SetAge (int age) { itsAge = age;} // inline!
void Meow() { std::cout << "Meow.\n";} // inline!
private:
int itsAge;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -