I am trying to make use of some inherited class & function (e.g. class X, function abc()) from other parent classes (e.g. class A,B), unfortunately, I have got 'multiple definition' error whlie compiling.
Expand|Select|Wrap|Line Numbers
- //AAA.h
- class A {
- public :
- virtual void abc();
- }
- class X : public A {
- public :
- void abc();
- }
- //AAA.cc
- void X::abc() {
- }
Expand|Select|Wrap|Line Numbers
- //BBB.h
- class B {
- public :
- virtual void abc();
- }
- class X : public B {
- public :
- void abc();
- }
- //BBB.cc
- void X::abc() {
- }
Thank you for any clue..
J