📄 mypoint.cpp
字号:
// mypoint.cpp : implementation file
//
#include "stdafx.h"
#include "draw.h"
#include "mypoint.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// mypoint
IMPLEMENT_SERIAL(mypoint,CObject,1)//serialize的要求
mypoint::mypoint()
{CPoint p1(0,0);
point=p1;
name='z';
refnum=0;
}
mypoint::mypoint(mypoint& tempmypoint)
{
point=tempmypoint.point;
name=tempmypoint.name;
refnum=tempmypoint.refnum;
}
mypoint::mypoint(CPoint tempoint)
{
point=tempoint;
name='z';
refnum=0;
}
mypoint::mypoint(CPoint tempoint,int i)
{
point=tempoint;
name='z';
refnum=i;
}
void mypoint::Serialize(CArchive& ar)
{
CObject::Serialize(ar);
if (ar.IsStoring())
ar<<point<<name<<refnum;
else
ar>>point>>name>>refnum;
}
mypoint::~mypoint()
{
}
void mypoint::operator =(const mypoint& temp)
{
point=temp.point;
name=temp.name;
refnum=temp.name;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -