【发布时间】:2011-11-24 00:05:32
【问题描述】:
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 */
在我看来他们都是一样的,我错了吗?请告诉我。
编辑:int *bar[10] 完全不同。
谢谢 拉贾
【问题讨论】:
-
数组不是指针,指针不是数组。阅读comp.lang.c faq 的第 6 节。既然你已经在那里了,也请阅读其他部分:-)