class student i public student(char n, char s, int m, int d, int y): birthday(m, d, y) i strcpy(name, n) sex-s, cout<<” calling student”<<endl; student({cout<” student Destructor calledⅦn”;} private: char names char sex: Tdate constructor called calling student Date birthday; //birthda v/ Tdate Constructor called calling student void main( student Destructor Tdate Destructor called student sl(“mike”,’m’,4,1,200) student destructor Tdate destructor called student s2(“tom”,f,5,19,1976);class student { public: student(char * n, char s ,int m,int d,int y):birthday(m,d,y) { strcpy(name,n); sex=s; cout<<”calling student”<<endl; } ~student( ) { cout<<”student Destructor called\n”;} private: char*name; char sex; Tdate birthday; //birthday为对象成员,它是TDate的 对象 }; void main( ) { student s1(“mike”,’m’,4,1,2000); student s2(“tom”,’f’,5,19,1976); } Tdate Constructor called calling student Tdate Constructor called calling student student Destructor Tdate Destructor called student Destructor Tdate Destructor called