Arrays from a class troubles

I am having troubles when compiling my code i get these errors:
error C3867: 'program::getIntMap': function call missing argument list; use '&program::getIntMap' to create a pointer to member

and also
error C2109: subscript requires array or pointer type

The errors are from the main method:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
int main()
{
	Program.setIntMapToValue(0);      //this sets all values in array to 0
	while (true)
	{
		ClearScreen();                    //clear screen before reprinting
		//Print Array
		for (int y = 0; y < 10; y++){
			for (int x = 0; x < 10; x++){
				cout << Program.getIntMap[x][y];     //<---here is the error 
			}
			cout << endl;
		}
		//printed


	}
}


and inside the class the code for getIntMap() is
1
2
3
4
int program::getIntMap(int x, int y){
	return intMap[x][y];
}


For some visualisation the point so far is printing an array of 1s and 0s, but for now this isnt working

Any help would be very helpful!
Last edited on
This Program.getIntMap[x][y];
should be This Program.getIntMap(x,y);
Last edited on
Oh my goodness, Im so silly! thank you so much I would of spent hours working this out! very grateful
Topic archived. No new replies allowed.