• ### Announcements

#### Archived

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

# linked list for virtual base classes??

## Recommended Posts

wazoo69    157
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 { private: 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