c++ 原始指针指针
struct C
{
int x, y;
} c;
int* px = &c.x;
int* pxe= px + 1;
int* py = &c.y;
int main() {
printf("value of c.x: = %d\n", c.x);
printf("value of c.y: = %d\n", c.y);
printf("address of c.x: = %p\n", (void*)&c.x);
printf("address of c.y: = %p\n", (void*)&c.y);
printf("sizeof int: = %d\n", sizeof(int));
return 0;
}
运行结果:


浙公网安备 33010602011771号