为什么too many initializers???求助
# include <stdio.h>void main(void)
{
int i, j;
double t, l, L, s = 0.0;
double x[5] = {0.30, 0.42, 0.50, 0.58, 0.66, 0.72};
double y[5] = {1.04403, 1.08462, 1.11803, 1.15603, 1.19817, 1.23223};
printf ("请从0.46,0.55,0.60中选择输入t的值:");
scanf ("%f", &t);
for (i = 0; i <= 5; i++)
{
for (j = 0; j <= 5; j++)
{
if(i != j)
{
l = (t - x[i]) / (x[i]-y[j]);
l = l * (t - x[i]) / (x[i]-y[j]);
L = y[j] * l;
s = s + L;
}
}
}
printf ("S = %f", s);
}
为什么总出现Compiling...
0.cpp
E:\Debug\0.cpp(9) : error C2078: too many initializers
E:\Debug\0.cpp(11) : error C2078: too many initializers