typedef int *ptr, (*fun)(), arr[5];
/* ptr is the type "pointer to int"
* fun is the type "pointer to a function returning int"
* arr is the type "array of 5 ints"
*/
And never, ever, bury the typedef in the middle of a declaration unsigned const long typedef int volatile *kumquat;
博客给出typedef定义类型的示例,如typedef int *ptr等,分别说明了ptr、fun、arr代表的类型,还提醒不要将typedef放在声明中间,如unsigned const long typedef int volatile *kumquat这种做法不可取。
2万+

被折叠的 条评论
为什么被折叠?



