【发布时间】:2011-06-09 19:44:12
【问题描述】:
为什么这不起作用,什么是好的选择?
class Grandparent
{
void DoSomething( int number );
};
class Parent : Grandparent
{
};
class Child : Parent
{
void DoSomething()
{
Grandparent::DoSomething( 10 ); // Does not work.
Parent::DoSomething( 10 ); // Does not work.
}
};
【问题讨论】:
标签: c++ inheritance polymorphism overloading