#include<iostream>
using namespace std;
class student{
public:
int score;
int age;
student(int score=20){
this->score=score;
}
/*
student(int score){
this->score=score;
}
基类构造函数的参数,有缺省的值,子类实例化对象时,可以不显示的调动基类,带参数的构造函数
*/
void display(){
cout<<score<<endl;
cout<<age<<endl;
}
};
class student1 :public student
{
public:
void display2(){
cout<<"student1"<<endl;
}
};
int main()
{
student1 st;
return 0;
}