1. c++ 类的简单使用
#include <iostream>
#include<vector>
#include<algorithm>
using namespace std;
class Person{
public:
Person(int h, int a): height(h), age(a){
// this->height = h;
// this->age = a;
}
int height;
int age;
};
int main()
{
Person p(165,20);
cout << p.height << " " << p.age << endl;
return 0;
}