#define PARAM_OFFSET(Strct, Field) ((unsigned long)&(((Strct *)0)->Field))
struct abc
{
int a;
int b;
int c;
};
void main()
{
printf("%d/n", PARAM_OFFSET(abc, a));
printf("%d/n", PARAM_OFFSET(abc, b));
printf("%d/n", PARAM_OFFSET(abc, c));
}
/*
0
4
8
Press any key to continue
*/