graph.cpp

来自「windows ce开发技巧与实例光盘代码」· C++ 代码 · 共 57 行

CPP
57
字号
// Graph.cpp: implementation of the CGraph class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Gr.h"
#include "Graph.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_SERIAL(CGraph,CObject,0)
CGraph::CGraph()
{

}

CGraph::~CGraph()
{

}

int& CGraph::GetX()
{
	return x;
}

int& CGraph::GetY()
{
	return y;
}
CGraph& CGraph::operator=(CGraph &Gr)
{
	x = Gr.x;
	y = Gr.y;
	return (*this);
}

CArchive& operator<<(CArchive& ar,CGraph& Gr)
{
	ar<<Gr.x<<Gr.y;
	return (ar);
}

CArchive& operator>>(CArchive& ar,CGraph& Gr)
{
	ar>>Gr.x>>Gr.y;
	//	ar.ReadObject(RUNTIME_CLASS(CGraph));
	return (ar);
}

⌨️ 快捷键说明

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