Compiler problem

I have a problem with two dimensional arrays. This is part of my code:
const int NUM_CARS = 5;
const int NUM_SPEEDS = 6;

void getData(int noiseDataP[][NUM_SPEEDS])
{
int speed;
for (int i = 0; i < NUM_CARS; i++)
{
cout << "Enter " << NUM_SPEEDS << " noise levels for car no " << i + 1 << endl;
for ( int j = 0; j < NUM_SPEEDS; j++)
{
speed = 20 * (j + 1);
cout << " At " << speed << "km/h: ";
cin >> noiseDataP[i][j];
}
}
}
When I compile it I get the following errors:

name lookup of 'i' changed for new ISO 'for' scoping
using obsolete binding at 'i'

I am studying for exam but can't get it right.
Last edited on
There's no 'k' there so this is the wrong function.
Topic archived. No new replies allowed.