⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 human.cpp

📁 这个是我们学校用的VC++教案
💻 CPP
字号:
// Human.cpp: implementation of the CHuman class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Assert.h"
#include "Human.h"

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

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

//IMPLEMENT_DYNAMIC(CHuman, CObject)
CHuman::CHuman()
{

}

CHuman::~CHuman()
{

}

void CHuman::AssertValid() const
{
 	CObject::AssertValid();
   	ASSERT(m_year>0); 
    ASSERT(m_year<120);
}

void CHuman::Dump(CDumpContext &dc ) const
{
	CObject::Dump(dc);
 	dc<<"Age = "<<m_year<<"\n";
}

⌨️ 快捷键说明

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