give you a hand

steven99ca (Don)
"我想在base class内部,定义一个base pointer, 用derived class初始化,同时又让他是这个base class的derived class"
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.
2002-1-27 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: 问一个C++的问题

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论