?? dogs1.h
字號:
#ifndef DOGS_H
#define DOGS_H
#include <string>
class Animal
{
public:
// Public methods
string GetName() const;
void SetName(const string& strNewName);
... Other methods common to Animals ...
private:
// We assume that all Animals have a name
string strName;
... Other attributes common to Animals ...
};
class Dog : public Animal
{
public:
// Public methods
void Bark();
... Other methods and attributes common to Dogs ...
};
class Collie : public Dog
{
... Methods and attributes specific to Collies ...
};
class Terrier : public Dog
{
... Methods and attributes specific to Terriers ...
};
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -