1st off, Im new to C++ programming.
I created a function to calculate garage parking charges.
I keep getting this last error:
HourFee.cpp(65) : error C2065: 'ROW_SIZE' : undeclared identifier
this is my error ---> ***int vehicleInfo[ROW_SIZE][COLUMN_SIZE];***
void calculateCharges()
{
int x;
int r;
for (x=1; x<=10; x++)
const int ROW_SIZE = 10;
const int COLUMN_SIZE = 2;
int vehicleInfo[ROW_SIZE][COLUMN_SIZE];
r= x - 1;
if (vehicleInfo[r][1] < 3.0)
double cost = 2.00;
if (vehicleInfo[r][1] > 18.0)
double cost = 10.00;
else
for (double charge = 2.50; charge < 10.00; charge = charge + .05)
{
int time = 3;
if (vehicleInfo[r][1] < time + 1)
double cost = charge;
else time = time + 1;
}
const int ARRAY_SIZE = 10;
double costArray[ARRAY_SIZE];
double cost = costArray [r];
double total=0;
cost += total;
}