我有以下班子:
class A {
public:
virtual void f() {}
};
class B : public A{
public:
void f(int x) {}
};
如果说我说的话,我会说,我说,如果说我说的话,我会说的话。
B *b = new B();
b->f();
the compiler says error C2660: B::f : function does not take 0 arguments. Shouldn t the function in B overload it, since it is a virtual function? Do virtual functions get hidden like this?
www.un.org/Depts/DGACM/index_spanish.htm 我确实打算从A继承B,这表明了同样的行为。