student.cpp

来自「学生信息管理系统实现了对本科生」· C++ 代码 · 共 46 行

CPP
46
字号
// Student.cpp: implementation of the CStudent class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "StudentMIS.h"
#include "Student.h"

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

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CStudent::CStudent()
{
	
}

CStudent::~CStudent()
{

}

CStudent::CStudent(CString strName,CString strID,int nAge,CString strDepartment)
{
	m_strName = strName;
	m_strID = strID;
	m_nAge = nAge;
	m_strDepartment = strDepartment;
}

void CStudent::Display(CListCtrl *pListCtrl,int nImage)
{
	CString strAge;
	strAge.Format("%d",m_nAge);
	pListCtrl->InsertItem(0,m_strName,nImage);
	pListCtrl->SetItemText(0,1,m_strID);
	pListCtrl->SetItemText(0,2,strAge);
	pListCtrl->SetItemText(0,3,m_strDepartment);
}

⌨️ 快捷键说明

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