Person(const string& name, int age);
virtual void ShowPersonInfo();
class Student : public Person
Student(int sid, const string& name, int age);
virtual void ShowPersonInfo();
Student hong(123456789, "길동", 29);
ptr_person->ShowPersonInfo();
ptr_person->ShowPersonInfo();
Person::Person(const string& name, int age)
void Person::ShowPersonInfo()
cout << name_ << "의 나이는 " << age_ << "살입니다." << endl;
Student::Student(int sid, const string& name, int age) : Person(name, age)
void Student::ShowPersonInfo()
cout << "이 학생의 학번은 " << student_id_ << "입니다." << endl;