class CP2
{
public:
CP2();
CP2(float fx , float fy ): x(fx) ,y(fy),w(1.0f){}
virtual ~CP2();
public:
float x ;
float y ;
float w ;
public:
CP2& operator= (const CP2 & p)
{
this->x = p.x ;
this->y = p.y ;
this->w = p.w ;
}
};
#include "P2.h"
class CLine
{
public:
CLine();
virtual ~CLine();
public:
CP2 m_ptOrg ;
CP2 m_ptEnd ;
CP2 P[1];
public:
void SetCLine()
{
}
void ReadCP2()
{
}
void Draw(CDC* pDC)
{
}
};
class CAge : public CCmdTarget
{
public:
CAge();
virtual ~CAge() ;
CAge(UINT in_val) : val(in_val) {}
private:
UINT val ;
public:
UINT GetValue() {return val ;}
//声明为内联函数要放在类的外面
friend bool operator == (const CAge & , const CAge &) ;
};
//这个内联定义要放在类的外面
inline bool operator == (const CAge & a , const CAge & b )
{return a.val == b.val ;}