I have a int costMap[20][20]; inside a dialog class.
Inside that class I am making an object from another class called pathFind
int costMap[20][20];
//costMap is filled with values (that represent the cost for each node -> pathFinder)
int (*firstElement)[20] = costMap;
pathFind *finder = new pathFind(*firstElement);
I would like to be able to acces the values of the multidimensional array inside the pathFind class
int (*costMap)[20];
pathFind::pathFind(int *map){
costMap = ↦
}
However this doesn't seem to work. I get an "cannot convert int** to int(*)[20] error.
Question: How can you access the elements of a multidimensional array through a pointer in another class
.in them.