Hello. I'm confused on this error I keep receiving in my function. Any help would be much appreciated.
This is my error: 1>c:\users\beverly\onedrive\school\ciss 241\week8_courseproject\week8_courseproject\source.cpp(329): error C2109: subscript requires array or pointer type
//***************************************************
// getEmptySeatByRowFC *
// To get the empty seats by row. *
//***************************************************
void getEmptySeatByRowFC(int fcrow, int EMPTY)
{
int total = 0;
//While a seat = empty in a row, total it.
for (int row = 0; row < fcrow; row++)
{
if (EMPTY == 1)
{
total += EMPTY + 1;
cout << "There are " << total << " empty seats in " << fcrow[row] << "." << endl;
}
}
}
Ah!! Originally I had fcrow as an array, but changed it down the road to just int. There's my problem. Thanks! Sometimes you can't see the forest through the trees.