I have declared a 2_D array as
int array [NO_OF_ROWS][NO_OF_COL];
NO_OF_ROWS and NO_OF_COL are constants.
I then have pointers *rowPtr and *seatPtr. I pass all of these to a function so I can save data from a binary file to the array along with an enumerated status as follows
void loadArray (int* &rowPtr, int* &seatPtr, status& seatStatus,
status seatArray[][NO_OF_COL])
in the function i try to save the status to the array with the line;
seatArray[rowPtr][seatPtr] = seatStatus;
when I try to compile I get the error:
invalid types ' status(*)[6][int*] for array subscript
I see that the array does not like the pointer value since it was declared as an int type. How would I set this up to allow the pointer to be used
std::arrayorstd::vector, and don't use pointers.rowPtrandseatPtrare supposed to represent. Could you post the code-snippet that initializes them?