Use heterogeneous arrays to store different child classes?
<p>I have a file that contains a list of names, colors, and some statistics about them.
For example:</p>

<pre><code>John black 10 15 
Adam black 19 18 
Jake brown 13 51 56 62 
Rich brown 13 09 98 84
</code></pre>

<p>I want to be able to store those names, colors, and numbers in their respective objects based on their colors.
So John and Adam, would be stored in the class Black,
Jake and Rich would be stored in class Brown.</p>

<p>How can I store each person in their respective objects since they are different types?</p>

<pre><code>class Color{
  public:
    Color(string FIRST, string COLOR);
  protected:
    string FirstName;
    string ColorType;

};

class Black : public Color{
  public:
    Black(string FIRST, string COLOR, int A, int B); 
  private:
    string FirstName;
    string ColorType;
    int number1, number2;
};

class Brown : public Color{
  public:
    Brown(string FIRST, string COLOR, int A, int B, int C, int D); 
  private:
    string FirstName;
    string ColorType;
    int number1, number2, number3, number4;
};
</code></pre>
