Or write a quick templated linked list class (though you require C++).
One where each object can be of a different class, much like an array of Ogre::Any class. Ogre::Any is a class in the OGRE rendering engine that you can attach anything to. This isn't required if you already know the type to add.
If you're using C you can also whip up a similar linked list struct.