I have 3 arrays defined as follows:
typedef struct heapMemNode
{
int *coord;
int x, y;
int *prevcoord;
int px, py;
int d;
char tp;
int *telcoord;
int c;
} hmemn;
hmemn *heapmem = calloc((siz2+1), sizeof(hmemn));
int *heaploc = calloc((siz2+1), sizeof(hmemn *));
int ***coords = (int ***)calloc((siz2+1), sizeof(int **));
for(i = 0; i<=siz2; i++){
coords[i] = (int**)calloc((siz2+1),sizeof(int*));
}
I want to be able to access elements in the heapmem array, e.g., heap[].tp, by entering coordinates in the coords array and following the pointer from this array to the heaploc array and the pointer from the heaploc array to heapmem where tp is accessed but I can't find the syntax to do this.