If there is a POD structure, with some member variables, for example like this:
struct foo { short a; int b; char c[50]; // ... };
Use the obvious:
sizeof( foo::a )
In C++, sizeof is ALWAYS evaluated at compile time, so there is no runtime cost whatsoever.