最近在研究busybox的fdisk代码,不觉明厉!差点让const这个尤物给迷糊!如今找到顺服的方法:
先读读这个,
char ** p1; // pointer to pointer to char const char **p2;// pointer to pointer to const char char * const * p3;// pointer to const pointer to char const char * const * p4;// pointer to const pointer to const char char ** const p5;// const pointer to pointer to char const char ** const p6;// const pointer to pointer to const char char * const * const p7;// const pointer to const pointer to char const char * const * const p8;// const pointer to const pointer to const char如果不觉得拗口,伱伢估计明了,这个好东西已经属于你了,不免有些高智商会犯晕,来,看看这个方法:
把一个声明从右向左读。就像刚一样再复读一遍,伱伢就明了!