📄 pnt.cpp
字号:
// Pnt.cpp: implementation of the CPnt class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "const.h"
#include "paintobj.h"
#include "Pnt.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
//IMPLEMENT_DYNAMIC(CPnt, CObject)
CPnt::~CPnt()
{
}
CArchive& operator >> (CArchive& ar, CPnt& Obj)
{
ar >> Obj.x >> Obj.y;
return ar;
}
CArchive& operator << (CArchive& ar, CPnt& Obj)
{
ar << Obj.x << Obj.y;
return ar;
}
void CPnt::operator =(CPnt pnt)
{
x=pnt.x;
y=pnt.y;
}
//
// overloaded operator ==: Test if 2 objects are identical.
//
BOOL CPnt::operator ==(CPnt& pt)
{
return (x == pt.x && y == pt.y);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -