b***y 发帖数: 2799 | 1 ☆─────────────────────────────────────☆
gebitan (job, job) 于 (Thu Sep 1 15:09:50 2005) 提到:
class Base{};
class Derived: protected Base {};
Base* bp = new Derived;
when complied, it shows "can't use derived* to initiliaze base*", but if I use
public inheritance, everything is fine.
☆─────────────────────────────────────☆
cdr (可读可写) 于 (Thu Sep 1 15:38:09 2005) 提到:
"Consider a class D derived from a base clas B, ....
If B is a protected base,....
Only friends and members of D and frien |
|