// Student.cpp : implementation file // #include "stdafx.h" #include "test.h" #include "Student.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CStudent CStudent::CStudent() { } CStudent::~CStudent() { } BEGIN_MESSAGE_MAP(CStudent, CEdit) //{{AFX_MSG_MAP(CStudent) // NOTE - the ClassWizard will add and remove mapping macros here. //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CStudent message handlers void CStudent::Serialize(CArchive& ar) { if (ar.IsStoring()) { // storing code ar<>add>>age>>name>>num>>sex>>tel; //从文件中读取 } }