今天在一个库头文件中看到类似于“typedef const int * const * SIZE”的这种写法,看了半天才明白。
typedef const int * const * SIZE 是把SIZE定义为常量指针,即const * SIZE等价于const int * ,SIZE为指向常量的指针类型别名
#include <stdio.h>
typedef const int * const * SIZE;
int main()
{
const int a = 5;
SIZE b = (SIZE)&a;
printf("value is %d\n", *(int *)b);
return (0);
}