这段代码的 for ( i=0;i<M;i++),一直在报错但是不知道什么原因,谢谢解答,是dev 写的
#include <iostream>
#define M 5
#define N 4
#include <cstdlib>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
int a[M][N];
int i=0,j;
int sum[M]={0,0,0,0,0};
int max=0,t;
for ( i=0;i<M;i++)
for (j=0;j<N;j++)
{
a[i][j]= rand() % 100;
}
printf("产生的随机矩阵为:\n");
return 0;
}