I have a set of nested structures
If I wish to use offsetof for m1two, the call is offsetof(Level1,m1two). Nice and simple.
In C++, if I wish to use offsetof for Level2.m2two, the call is offsetof(Level1::Level2,m2two). This doesn't work for C. How do you do it in C?
Code:
struct Level1
{
int m1one;
int m1two;
struct Level2
{
int m2one;
int m2two;
} mLevel2;
};
In C++, if I wish to use offsetof for Level2.m2two, the call is offsetof(Level1::Level2,m2two). This doesn't work for C. How do you do it in C?