#include
#include
class CPerson{
char name[10];
char code[19];
char sex[3];
int age;
public:
CPerson(char*new_name,char*new_code,char*new_sex,int new_age)
{strcpy(name,new_name);
strcpy(code,new_code);
strcpy(sex,new_sex);
age=new_age;
}
void show()
{cout<<"姓名:"< <<"性别:"<
};
void main()
{
CPerson a("嘿嘿","320324199901011234","男",99);
a.show();
}
不太会自定义多字节整数,所以把身份证号改成数组了,呵呵。
嘿嘿,我不会