Student.cpp 257 Bytes
Newer Older
刘睿博's avatar
ver 1.0  
刘睿博 committed
1
#include "Student.hpp"
刘睿博's avatar
刘睿博 committed
2
#include "cstring"
刘睿博's avatar
ver 1.0  
刘睿博 committed
3 4 5 6 7

Student::~Student() {
    printf("Student destructor called\n");
}

刘睿博's avatar
刘睿博 committed
8 9 10 11
char* Student::print() const {
    char *res = Human::print();
    sprintf(res + strlen(res), "I'm from %s\n", school_.c_str());
    return res;
刘睿博's avatar
ver 1.0  
刘睿博 committed
12
}