Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


multi inheritance?

This topic is 5626 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hello, I'm having problem with multi inheritance. While I think about it I have mostly used single inheritance or sometimes multi when inheriting multiple interfaces. class IBaseA { public: virtual void test() = 0; }; class IBaseB : public IBaseA { public: virtual void test2() = 0; //virtual void test() = 0; }; class ImplA : public IBaseA { public: void test() { } }; class ImplB : public IBaseB, public ImplA { public: void test2() { } }; In My opinion I should get an error about inhereting from IBaseA two times, from IBaseB and ImplA. But maybe that doesn't matter since the functions are virtual anyway? But the thing is that unless I implement tha test() function in ImplB I will get an error about Abstract class and that I haven't implemented the test() function that is needed by the IBaseA. So I basically want the implementation of test() to come from the ImplA class. Does anyone know why? If anyone got a good tutorial on multi inheritance like this, that would also be appreciated [edited by - bilsa on May 21, 2004 2:33:53 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!