Maybe I misunderstand but let's see if this is anywhere close:
Fact: there are 54 groups
Fact: each member of the 54 groups has the same three data elements.
So that would mean you have a polymorphic hierarchy where the base class is:
- class Group
-
{
-
public:
-
void ChangeTst1( int arg);
-
void ChangeTst2( int arg);
-
void ChangeTst3( int arg);
-
private:
-
int tst1;
-
int tst2;
-
int tst3;
-
};
-
Then you declare a type of the Group:
- class Blue : public Group
-
{
-
stuff unique to the Blue group..
-
};
Then you declare a member of the group:
- class Violet : public Blue
-
{
-
stuff unique to Violet...
-
};
Now you create a Violet object and modify it:
- Group* ptr = new Violet;
-
ptr->ChangeTst1(32); //changes tst1 in the Violet object
Is this close to what you need? I have omitted some details.