Good Morning,

I am trying to create 2 arrays out of a list. Here is the code that I use:

int* move_x= new int[10];
int* move_y=new int[10];

void D::printpath(){
	int i=0;
	list<state>::iterator iter2;

	for(iter2=path.begin(); iter2 != path.end(); iter2++) {
	  cout<<"["<<iter2->x<<" , "<<iter2->y<<"]";

It gives an error: IntelliSense: expression must have (pointer-to-) function type.

What am I doing wrong? How should I create the arrays?

Lines 10 and 11. You are using () instead of []