d-shape.h
来自「一些学习c++的例题」· C头文件 代码 · 共 28 行
H
28 行
#ifndef __SHAPE_H__
#define __SHAPE_H__
#include "graphenv.h"
class CShape
{
private:
static long m_nObjectCount;
protected:
long m_nID;
public:
CShape() { m_nID = m_nObjectCount++; }
~CShape() { m_nObjectCount--; }
virtual void Show(const int color) const = 0;
virtual void Move(const int offsetX, const int offsetY) = 0;
virtual void Inflate(const float s) = 0;
};
#ifndef __OBJECT_COUNT__
#define __OBJECT_COUNT__
long CShape::m_nObjectCount = 0;
#endif
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?