示例:
#include<iostream>
using namespace std;
#define my_sizeof(L_Value) ( (char *)(&L_Value + 1) - (char *)&L_Value )
struct d
{
int a;
double b;
char c[2];
};
struct dd
{
int a[10];
char b;
double c;
d e;
};
int main()
{
dd f;
cout<<my_sizeof(f)<<endl;
return 0;
}