Jump to content
  • Advertisement


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


linked list for virtual base classes??

This topic is 6162 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

Hi, Just working on the Renderer object for my small gaming library... I have virtual base classes defined in the static library, then implemented in a DLL file which the user of my library must use... I've got most things working properly, HOWEVER I have a few objects in the static library which I want to contain a linked list (or array) of interfaces....??? sorry if my explanation sucks...I'll try it this way..
class Font
  virtual render() = 0;


//the following class resides in my rendering DLL

class OGL2DFont : public Font
   render(); //define the inherited pure virtual function


//now I WANT to do the following but because base is

//a pure virtual class, the compiler won't let it happen

class fontManager
     Font    *m_bases; //pointer to a base array

Where I'm trying to go with this is I can just hold an array of Font objects which are then implemented inside my opengl renderer DLL.. any ideas?? Or am I stuck with the "hack" solution of NOT making the base class pure virtual..(ie. just using regular virtual instead of a pure virtual definition).. thanks in advance... Edited by - wazoo69 on January 2, 2002 11:30:02 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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!