Person类
来源:百度文库 编辑:神马文学网 时间:2024/10/01 10:50:50
//主文件m.cpp
#include "person.h"
void main()
{
Person zh("Zhang",50,‘m‘),c("Cai",35,‘w‘);
zh.Show();
c.Show();
}
//Person.h
class Person
{
char name[10],sex; //姓名,性别
int age; //年龄
public:
Person(char *,int,char);
void Show(); //显示各属性
};
//Person.cpp
#include "person.h"
#include
#include
using namespace std;
void Person::Show()
{
cout<<"name:"<cout<<",age:"<cout<<",sex:"<}
Person::Person(char *n,int a,char s)
{
strcpy(name,n);
age=a;
sex=s;
}
#include "person.h"
void main()
{
Person zh("Zhang",50,‘m‘),c("Cai",35,‘w‘);
zh.Show();
c.Show();
}
//Person.h
class Person
{
char name[10],sex; //姓名,性别
int age; //年龄
public:
Person(char *,int,char);
void Show(); //显示各属性
};
//Person.cpp
#include "person.h"
#include
#include
using namespace std;
void Person::Show()
{
cout<<"name:"<
Person::Person(char *n,int a,char s)
{
strcpy(name,n);
age=a;
sex=s;
}
Person类
Person类的内嵌成员函数
Famous Person
person website to money
person website to money
person website to money
A person's life
素材库.30男性 Person - male
SmartMoney.com — Investing, Saving and Person...
Person of the Century: Albert Einstein
The characters for a person's mature
to the world you are one person,but to one person you are the world
to the world you are one person,but to one person you are the world
精品文摘:Packaging A Person 人的包装
Designrific : How I (color blind person) see the world!
时代周刊人物:你 You: Person of the Year
Mainland's richest person is 26-year old wom...
The Final Showdown Between In-Person(现实) and Cyberspace Relationships
晨读英语美文100篇六级第2课在线学习“Packing” a Person
英语中形形色色的“人”In English of all forms "person"
天安门前拍下的这张照片让人泪如泉涌(图)(Before tiananmen under this photo let person tears )
Entrepreneur‘s Credo of the American I do not choose to be a common person. It is my right to be unc
CRect类(矩形类)
CRect类(矩形类)