[求助]二维数组这样赋值为何不行?
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a[10][10];
a[10][10] = {{0}};
return 0;
}
错误如下!
main.c:8: error: syntax error before '{' token
:: === Build finished: 1 errors, 0 warnings ===
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a[10][10];
a[10][10] = {{0}};
return 0;
}
错误如下!
main.c:8: error: syntax error before '{' token
:: === Build finished: 1 errors, 0 warnings ===
2006-12-06 14:38
2006-12-06 14:49
2006-12-06 15:00
2006-12-06 15:07
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a[10][10];/*a[10][10]={{0}}*/
a[10][10] = {{0}};/*这样写法本身是错误,对a[10][10]这个己经超过范围,就算能通过,隐藏隐患。*/
return 0;
}

2006-12-06 15:16
2006-12-06 15:23
2006-12-06 15:40
2006-12-06 15:46

2006-12-06 15:57
2006-12-06 16:14