Computer Science Canada Figuring out what class a variable is |
Author: | smool [ Sat Dec 10, 2011 1:48 am ] | ||
Post subject: | Figuring out what class a variable is | ||
What is it you are trying to achieve? Say I have a Weapon parent class, and then a Ranged child class and a Melee child class, is there a way to check to see if my pointer is pointing to a Ranged class or Weapon class? maybe something like:
is there any way to do that aside from making boolean variables in the parent class and calling those? |
Author: | Nick [ Sat Dec 10, 2011 6:27 am ] | ||
Post subject: | RE:Figuring out what class a variable is | ||
I think you're looking for objectclass. Take a look at the following
|
Author: | smool [ Thu Dec 15, 2011 4:59 pm ] |
Post subject: | RE:Figuring out what class a variable is |
thx ![]() |