-1
不編譯:的extern數組在C沒有大小
int a[];
編譯:
extern int a[];
不編譯(實在找不到的sizeof):
printf("%lu\n", sizeof(a)/sizeof(int));
所以問題:
- 爲什麼有可能創建extern數組。
- 分配多少內存?
問題的原因 - http://users.dcc.uchile.cl/~rbaeza/handbook/algs/4/444.sort.c
extern int maxfiles, maxruns[], actruns[];
for (i=0; i<=maxfiles; i++) maxruns[i] = actruns[i] = 0;
它是正確的嗎?
外部變量需要鏈接.... – pinkpanther
可能的重複[數組的外部延遲?](http://stackoverflow.com/questions/3071890/external-delaration-for-an-array) –