subscript requires array or pointer type

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  //***************************************************
//				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;		
		}

	}
}
What are you confused about? fcrow is an integer type.

What would you expect 5[0] to do?
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.
Topic archived. No new replies allowed.