1.T t;
Teacher teach ;//T t = new T t(); teach.SetName("lizl"); teach.Say();
2 *t
Teacher *b=&teach ; b->SetName("rename"); b->Say();
3.&t
Teacher &c=teach; c.Say(); cout<< b <<endl;
时间: 2024-10-29 19:08:32
1.T t;
Teacher teach ;//T t = new T t(); teach.SetName("lizl"); teach.Say();
2 *t
Teacher *b=&teach ; b->SetName("rename"); b->Say();
3.&t
Teacher &c=teach; c.Say(); cout<< b <<endl;