📄 univ.h
字号:
class univ_community
{
friend class tree;
protected:
char last_name[15];
char first_name[15];
int age;
long social_security_number;
public:
univ_community(char *ln,char *fn,int a,long ss)
{
strcpy(last_name,ln);
strcpy(first_name,fn);
// age=a;
// social_security_number=ss;
}
univ_community(){last_name[0]='\0';
first_name[0]='0';
// age=0;
// social_security_number=0;
}
void set_last_name(char *last_n)
{
strcpy(last_name,last_n);
}
void set_first_name(char *first_n)
{
strcpy(first_name,first_n);
}
/* void set_age(int a)
{
age=a;
}
void set_social_security_number(long soc_sec)
{
social_security_number=soc_sec;
}*/
virtual void print()
{
cout<<endl<<last_name
<<first_name<<"Age:"<<age<<endl
<<"Social Security #"<<social_security_number;
}
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -