不懂就问,老师是不是说错了,构造函数的顺序应该看MigrantWorker.h里的继承顺序
如class MigrantWorker:public Farmer,Public Worker就先构造Farmer后构造Worker
class MigrantWorker:public Worker,Public Farmer就先构造Worker后构造Farmer
如class MigrantWorker:public Farmer,Public Worker就先构造Farmer后构造Worker
class MigrantWorker:public Worker,Public Farmer就先构造Worker后构造Farmer
2019-12-08