Raj*_*aja 4 c arrays types pointers
int bar[10]; /* bar is array 10 of int, which means bar is a pointer to array 10 of int */
int (*bar)[10]; /* bar is a pointer to array 10 of int */
Run Code Online (Sandbox Code Playgroud)
据我说他们都是一样的,我错了吗?请告诉我.
编辑:int*bar [10]完全不同.
谢谢Raja
它们完全不同.第一个是数组.第二个是指向数组的指针.
第一次bar声明后的注释绝对不正确.第一个bar是10 int秒的数组.期.它不是指针(即你的"意思是"部分完全没有意义).
它可以这样表达:
typedef int T[10];
Run Code Online (Sandbox Code Playgroud)
你的第一个bar有类型T,而你的第二个bar有类型T *.你明白之间的差别T和T *,你呢?