是C++语法傻还是我笨???
#include <iostream.h>
class a
{
public:
int a;
void t(int j) {cout << 3;}
};
class b:public a
{
public:
int b;
void t() {cout << 4;}
};
void main()
{
a c1;
b c2;
c2.t(2); //Error
}
在class b内定义的function member t与它的base class内定义的function member t参数个数不同,为什么仍然认为它被override?