#define MAX 100 double velocity[MAX]; for (itr = 0; itr < velocity[0]; itr = itr + 1) { velocity[itr] = velocity[0] - (1*itr); distance[itr] = rk4_solve(itr, velocity); cout << setw(5) << itr << setw(9) << velocity[itr] << setprecision(4) << setw(10) << distance[itr] << endl; }
I am trying to input values into the array but for some reason I get the error: i Invalid types 'double [100][double]' for array subscript for the 3 lines inside the for loop.