quote:Original post by briktal
I have a class, Hero. I then did "Hero test;" and "Hero test2;" They have a number of stats, with functions to set and retrieve them ( int GetStr(), void SetStr(int str) ) One function has test attack test2. To do this, I need some stats from each of the Heroes. I want to be able to use some kind of variable to determine which Hero is attacking, and which is being attacked, so I can get the appropriate stats. Right now, I am just trying to find a way to use a variable, attacker, instead of test, to call test.GetStr(). I would like to know if there is a better way to do all of this.
Ok, someone already asked you but for some unknown reason, maybe you didn''t understand, post some code and then we will help you. In other words, post your class declaration at least so we can see what you''re actually trying to do...
"And that''s the bottom line cause I said so!"
** I WANT TO BE THE MODERATOR FOR THE LINUX FORUM **
Cyberdrek
Headhunter SoftA division of
DLC MultimediaResist Windows XP''s Invasive Production Activation Technology!
"gitty up" -- Kramer
/(bb|[^b]{2})/ that is the Question -- ThinkGeek.com