J
Judith
Hi there everyone
I've got:
class A
{ ... };
class B : public A
{ ... }
void foo(A** a)
{ ... }
int main(...)
{
B* b = new B();
foo(&b);
}
GCC complains with "passing 'B**' as argument 1 of 'foo(A**)'"
Upcasting through one level of reference is most common, why is this different?
Thanks for any insight,
Judith
I've got:
class A
{ ... };
class B : public A
{ ... }
void foo(A** a)
{ ... }
int main(...)
{
B* b = new B();
foo(&b);
}
GCC complains with "passing 'B**' as argument 1 of 'foo(A**)'"
Upcasting through one level of reference is most common, why is this different?
Thanks for any insight,
Judith