![]() |
#2
某一天2017-05-04 11:19
|
比如有一个结构体:
struct App {int a, int b};
现在知道指针 int *p是指向这个结构体数组的 但是不知道具体的数组内容
想通过这个指针来访问第9个元素怎么写呢
App *appPtr = (App *)(ptr + 8);
这样怎么出错了呢