/*令人震惊的事实:数组和指针并不相同*/
/*4.1 数组并非指针*/
/*x is pointer point to type int*/
extern int *x;
/*y is an array of elements is type int, the length is not certain. It's storage by definited in somewhere.*/
extern int y[];
/*我的代码为什么无法运行*/
/*类型不匹配*/
//文件1:
int mango[100];
//文件2:
extern int *mango;
...
/*一些引用mango[i]的代码*/
/*类型不匹配*/
//文件1:
int guava;
//文件2:
extern float guava;
/*对数组的引用总是可以写成对指针的引用,而且切实存在一种指针和数组完全相同的
*上下文环境,不幸的是,这只是数组的一种极为普通的用法,并非所有情况下都是如此,
*包括上面完全错误的“数组定义等同于指针的外部声明”这种情况。
*/