#include <iostream>
using namespace std;
//继承demo
class Person
{
private:
const int a;
const int b;
public:
friend class Students;
Person(int i, int j):a(i), b(j){}
virtual void display()=0;
int getA(){
return a;
}
int getB(){
return b;
}
};
class Students: public Person
{
public:
Students(int i, int j): Person(i, j) {}
void display()
{
cout << "Student!" << endl;
}
void output()
{
cout << a << ' ' << b << endl;
}
};
int main() {
Students *stu = new Students(12, 14);
stu->display();
stu->output();
return 0;
}