×

Loading...

give you a hand

"我想在base class内部,定义一个base pointer, 用derived class初始化,同时又让他是这个base class的derived class"
FYI:
1.using constructor
If you have few members.
2.using copy constructor
which can handle whatever data members you need,but it 's not always suitable.
BTW,Your code is typically bad practice in OO programming.
Report

Replies, comments and Discussions: