I have a question regarding the way I want to organize my game. Right now, the game is pretty much finisihed, but the code is pretty ugly. Here is one scenario that I would like help on, and then I can probably apply that to the rest.

Lets say there is one main class, called Person. There are two sub classes that inherit from Person, called Gunner and Fighter. Pretty much as follows:

Code:
class Person
{
public:
     char Name[100];
     int x_pos;
     int y_pos;
};

class Gunner : public Person
{
public:
     int amount_of_bullets;
     // random other attributes
};

class Fighter : public Person
{
public:
     char weapon_type[100];
     // random other attributes
};
Everything is nice and dandy right now. Then we have a class called Army, and it holds a vector of Persons, like so:

Code:
class Army
{
public:
     vector<Person> m_arUnits;
};
Now, the problem I am having is this: If you declare things like this:

Code:
Fighter Herc;
Gunner Guns;
Army Phalanx;

Phalanx.m_arUnits.push_back(Herc);
Phalanx.m_arUnits.push_back(Guns);
You only have access to the Person attributes when you iterate through the vector. I want to be able to access the other things like weapon_type and amount_of_bullets. So basically my question is: Is there anything I can store the information in so I can access specific data relative to the current class? If not, can anyone give me advice on how to set up this scenario so that it can be organized and efficient, and also has room for growth?

Thanks for any help,

Khelder