name resolution of inherited templated classes?

  • From: Tyler Littlefield <tyler@xxxxxxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Tue, 27 Jul 2010 10:53:26 -0600

Hello all,
I'm working on my game engine again, and ran into a bit of a problem.
I have a function that is called when a command is ran, which gets passed a 
pointer to the player that called it.
What I'm trying to do is get a variable from my VariableContainer class, which 
finds the variant and returns the value. So, basically:
Player inherits Entity (which is a game object), and Entity inherits the 
templated VariableContainer class.
In my command I have something like:
int str=mobile->Get("strength");
When I compile, it says that the get function could not be found in class 
'Player'.
Is there a workaround to this? I tried adding a Get function into Entity which 
would do:
VariableContainer::Get("bla") and return that, but that failed also.

                Thanks,
Tyler Littlefield
        http://tds-solutions.net
        Twitter: sorressean

__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

Other related posts: