I have a whole program that is working with pointers, dynamically allocating and arrays, etc.
My last function that was given to me is a function to delete matrix. Here is the given information:
/*
Deletes a two dimensional dynamically allocated matrix
-- rows: The number of rows in the matrix
-- **matrix: the matrix to be deleted
*/
void delete_matrix(int rows, char **matrix)
{
delete[] matrix;
}
My question is, is this right? and also why is a value for rows being passed in?