R
rob.iverson
We ran into this problem and I can't see why the compilers (Sun One
Studio 8 and g++ 2.95) think it's an error:
-------------------
class A
{
public:
void foo();
};
class B : public A
{
public:
void foo(int i);
};
void B::foo(int i)
{
foo(); // Both compilers give an error here.
}
class C
{
public:
void foo();
void foo(int i);
};
void C::foo(int i)
{
foo(); // Neither compiler gives an error here.
}
Studio 8 and g++ 2.95) think it's an error:
-------------------
class A
{
public:
void foo();
};
class B : public A
{
public:
void foo(int i);
};
void B::foo(int i)
{
foo(); // Both compilers give an error here.
}
class C
{
public:
void foo();
void foo(int i);
};
void C::foo(int i)
{
foo(); // Neither compiler gives an error here.
}