I have a dynamic matrix in a class created by allocating memory in this way:
int **m; //this in the member head pointer
void allocate_mem(int ***ptr, unsigned r, unsigned c){
*ptr = new int *[r];
(*ptr)[0] = new int[r*c];
for(unsigned i = 1; i < r; i++)
(*ptr)[i] = (*ptr)[0] + i*c;
}
how can I call the pointers to the rows? I mean, m is the pointer to the array of pointers, *m is the pointer to the first row, but I don't know how to call the pointers to the other row
std::vectorfor the storage.