If there is a POD structure, with some member variables, for example like this:
struct foo { short a; int b; char c[50]; // ... };
You can create macro wrapper of what @Erik suggested as:
#define SIZE_OF_MEMBER(cls, member) sizeof( ((cls*)0)->member )
And then use it as:
cout << SIZE_OF_MEMBER(foo, c) << endl;
Output:
50
Demo : http://www.ideone.com/ZRiMe