⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hour08_2.hpp

📁 《24学时精通c++》的随书源码的下半部分。欢迎下载学习。
💻 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 + -