I have a code like this:
that of course compiles correctly. The question is : what is the proper syntax
to declare the DOH's function bodies outside B declaration?
That is if I write
the compiler rises the error "the symbol to the left of a '::' must be a type"
thanks
Code:
struct A1{ virtual void DOH()=0 };
struct A2{ virtual void DOH()=0 };
struct B: public A1,A2{
void A1::DOH(){ printf("doh!"); }
void A2::DOH(){ printf("doh!"); }
};
that of course compiles correctly. The question is : what is the proper syntax
to declare the DOH's function bodies outside B declaration?
That is if I write
Code:
...
struct B: public A1,A2{
void A1::DOH();
void A2::DOH();
};
void B::A1::DOH(){ printf("doh!"); }
void B::A2::DOH(){ printf("doh!"); }
the compiler rises the error "the symbol to the left of a '::' must be a type"
thanks