【发布时间】:2018-03-30 21:52:31
【问题描述】:
有没有办法获取指针所指向的数据类型?我对与 typeof 类似的东西感兴趣。我希望我能用 sn-p 代码更好地解释它:
struct_t *pointer1;
struct_t **pointer2;
typeof_ptr(pointer) a; // here a should be of type struct_t
typeof_ptr(pointer) b; // here b should also be of type struct_t
【问题讨论】: