student.cpp
来自「深入浅出Visual C++入门进阶与应用实例 随书光盘 作者 何志丹」· C++ 代码 · 共 34 行
CPP
34 行
// Student.cpp: implementation of the CStudent class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.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()
{
}
bool CStudent::SetAge(int iAge)
{
if(iAge < 5 || iAge > 50 )
return false ;//设置失败
m_iAge = iAge ;
return true ;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?