class MyParam{
public:
int a;
static int b;
int c;
static int y;
static int z;
};
sizeof(MyParam) = 8
int MyParam::b = 10;
int MyParam::z = 10;
int main()
{
MyParam p;
MyParam dest;
p.a = 10;
p.b = 2;
p.c = 4;
memcpy(&dest, &p, sizeof(MyParam));
printf("sizeof(MyParam)=%d\n", sizeof(MyParam));
printf("%d %d %d\n", p.a, p.b, p.c);
printf("%d %d %d\n", dest.a, dest.b, dest.c);
}
[xiaochu.yh@OceanBase036197 cpp]$ ./a.out
sizeof(MyParam)=8
10 2 4
10 2 4