C++面向对象实践
2020-12-13 05:45
标签:std span pac cout 实践 namespace pre ace eth 实践如下: C++面向对象实践 标签:std span pac cout 实践 namespace pre ace eth 原文地址:https://www.cnblogs.com/do-your-best/p/11147888.htmlclass Person{
private:
int age;
char name[25];
int hight;
public:
Person(int age, int hight, char* name);
int getAge();
char* getName();
int getHight(){
return hight;
}
};
#include "Person.h"
Person::Person(int age, int hight, char* name1){
Person::age = age;
Person::hight = hight;
Person::name = name1;
}
int Person::getAge(){
return age;
}
char* Person::getName(){
return name;
}
#include