person.cpp

来自「MFC做的学生管理系统」· C++ 代码 · 共 39 行

CPP
39
字号
// Person.cpp: implementation of the CPerson class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
 
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_SERIAL(CPerson, CObject, VERSIONABLE_SCHEMA | 1)

CPerson::CPerson()
{

}

CPerson::~CPerson()
{

}

void CPerson::Serialize(CArchive &ar)
{
	// 对象序列化保存
	if (ar.IsStoring())
	{
		ar << m_strName << m_strSex << m_nAge << m_strTel;
	}
	else
	{
		ar >> m_strName >> m_strSex >> m_nAge >> m_strTel;
	}
}

⌨️ 快捷键说明

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