Original Post
Hello,
Right now i am planning how i am going to store the data for my objects in my engine. I think i have come up with a way by using inheritance to use a link list to do what i want. When i do this, i want to be able to name my objects like CTerrain, or CCrazyGuyWithGuy, but in my link list , i cant possibly say CTerrain Instance, or CCrazyGuyWithGun Instance, because i dont know if it is terrain or crazy guy. So i was thinking to use inheritance and add it on to each object i create, something like CObject, that would have virtual functions in it, like Update, initalize, and destroy. And in my list list, i would just do CObject Instance; and then do something like Terrain = (CTerrain)Instance;
then
Terrain->Update() do what ever. Would that work, or wwould i have to use something like templates? I dont know much about them but i think this might be a scenario for them. Or if you have other ideas about how i can go store my objects like this, i am all ears
Thanks for any help
"What we do in life, echos in eternity" -- Gladiator