animal.h.txt

来自「C++上机课的习题答案」· 文本 代码 · 共 32 行

TXT
32
字号
// Chapter 10 of C++ How to Program
// Debugging Problem (animal.h)

#ifndef ANIMAL_H
#define ANIMAL_H

// Note: class Animal is an abstract class
// class Animal definition
class Animal {

public:
   Animal( int = 0, int = 0 );

   void setHeight( int );
   virtual int getHeight() const;

   void setWeight( int );
   virtual int getWeight() const;

   virtual void print() const = 0;   

private:
   int height;
   int weight;

}; // end class Animal

#endif // ANIMAL_H



⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?