📄 person.h
字号:
// person.h: interface for the person class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_PERSON_H__4CF36D8F_EB2D_43A7_AA8E_F3DB0065A9AB__INCLUDED_)
#define AFX_PERSON_H__4CF36D8F_EB2D_43A7_AA8E_F3DB0065A9AB__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#include <iostream.h>
#include <string.h>
#endif // _MSC_VER > 1000
class person
{
friend class Ban;
public:
Person(){strcpy(name,"hello");age=16;sex=man;}
virtual ~person();
virtual void showInfo()
{
cout<<name<<","<<age<<","<<(sex?"Woman":"Man")<<endl;
}
void change() {}
protected:
char name[12];
int age;
enum Sex {man=0,woman=1};
Sex sex;
};
#endif // !defined(AFX_PERSON_H__4CF36D8F_EB2D_43A7_AA8E_F3DB0065A9AB__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -