为什么在两个for循环里出现了重复定义?
我完全照着书打的,编译器说我重复定义!!int table[3][4]={{1,2,3,4},{2,3,4,5},{3,4,5,6}};
for(int i=0;i<3;i++)
{
for(int j=0;j<4;j++)
cout<<table[i][i]<<" ";
cout<<endl;
}
rowSum(table,3);
for(int i=0;i<3;i++)
cout<<"Sum of row "<<i<<" is "<<table[i][0]<<endl;
) : error C2374: 'i' : redefinition; multiple initialization
p(15) : see declaration of 'i'
难道是我的编译器有问题?