double PP2[8][8];
double x;
double n;
double d;
for(double i = 0; i < 8; i++)
{
n = i + 1;
d = n / (n * (n - 1) - (n - 2) * (n - 3) / 2);
x = (n - 1) * d;
for(double k = 0; k < i ; k++)
{
PP1[i][k] = x - k * d;
}
PP1[i][i] = x;
}
有六个错误:
e:\documents and settings\administrator\my documents\map\main.cpp(77) : error C2108: subscript is not of integral type
e:\documents and settings\administrator\my documents\map\main.cpp(77) : error C2108: subscript is not of integral type
e:\documents and settings\administrator\my documents\map\main.cpp(77) : error C2440: '=' : cannot convert from 'double' to 'double (*)[8]'
There is no context in which this conversion is possible
e:\documents and settings\administrator\my documents\map\main.cpp(79) : error C2108: subscript is not of integral type
e:\documents and settings\administrator\my documents\map\main.cpp(79) : error C2108: subscript is not of integral type
e:\documents and settings\administrator\my documents\map\main.cpp(79) : error C2440: '=' : cannot convert from 'double' to 'double (*)[8]'
There is no context in which this conversion is possible
怎么回事啊?