[求助]请指教
#include<stdio.h>
const int num=8;
main ()
{
int board [num]={0}; //error C2057: expected constant expression
//error C2466: cannot allocate an array of constant size 0
}
请指教,谢谢
#include<stdio.h>
const int num=8;
main ()
{
int board [num]={0}; //error C2057: expected constant expression
//error C2466: cannot allocate an array of constant size 0
}
请指教,谢谢
2007-08-22 17:38
2007-08-22 18:54
用预定义试试;
#define num 8
2007-08-22 19:01
2007-08-22 19:10
以C99的标准来看,这段代码的确是没错。。。
不过这段代码能连DEV-C++都编译不过~~~~``不知什么编译器能很好地支持C99

2007-08-22 20:14
2007-08-22 20:16
2007-08-22 20:17
2007-08-22 20:28

2007-08-22 20:28
2007-08-22 20:32