M
mg.conti
Hi,
with this code:
class Base {
public:
virtual int Simple(int i, int j);
virtual int Simple(int i);
virtual ~Base(); // make compiler happy
};
class Derived : public Base {
public:
virtual int Simple(int i);
};
int
main(int argc, char* argv[])
{
Derived b;
b.Simple(1, 2);
}
Compiling with gcc 4.1.1 the call b.Simple(1,2) in main is not
resolved, while removing the declaration of Simple() in class Derived
all works.
Why the compiler don't see the Simple() with 2 parameter defined in
Base?
Thanks,
Marco
with this code:
class Base {
public:
virtual int Simple(int i, int j);
virtual int Simple(int i);
virtual ~Base(); // make compiler happy
};
class Derived : public Base {
public:
virtual int Simple(int i);
};
int
main(int argc, char* argv[])
{
Derived b;
b.Simple(1, 2);
}
Compiling with gcc 4.1.1 the call b.Simple(1,2) in main is not
resolved, while removing the declaration of Simple() in class Derived
all works.
Why the compiler don't see the Simple() with 2 parameter defined in
Base?
Thanks,
Marco