class someclass{
public:
struct somestruct{
int a;
int b;
}structObj;
void function(void){};
}classObj;
How do I specify the object structObj of classObj. Meaning if I wanted to specify function of classObj I would say classObj::function(). So how would I specify int a in structObj classObj
In the case of pointers, just use regular pointer syntax:
1 2 3 4 5 6 7 8
//If someclass is a pointer:
someclass->somestruct.a;
//If somestruct is a pointer:
someclass.somestruct->a;
//If a is a pointer:
int b = *(someclass.somstruct.a);
//If they're all pointers:
int b = *(someclass->somestruct->a);