14
I have the following union:
union employee
{
char key;
struct manager
{
short int age;
float shares;
short int level;
};
struct worker
{
short int age;
short int skill;
short int department;
};
} company[10];
How can I access a member of a structure which is inside the union employee?
I tried to access the age member of the manager structure this way:
company[i].manager.age
But I get error C2039: 'manager' : is not a member of 'employee'.