I am trying to implement a contract class in Borland C++ Builder, but get a compilation error that I do not understand. The code looks like:
class baseClass2 {
public:
virtual void test () = 0;
};
class derivedClass: public baseClass2 {
derivedClass () {test ();};
};
void baseClass2::test () {
};
ant it compiles, but I believe that
void baseClass2::test ()should be in the derived class. If I put it here, I get
[C++ Error] multiple_inheritance.cpp(33): E2316 'derivedClass::test()' is not a member of 'derivedClass'
Why am I getting this? Thanks!