Delete pointer to multidimensional array in class through another pointer - how?
I have a pointer to a class, that have a pointer to a multidimensional array but I can't seem to delete it from memory when I need to or set it to NULL. #define X 10 #define Y 10 struct TestClass { public: int *pArray[X][Y]; }; // different tries, none working: delete Pointer_To_TestClass->pArray[0][0]; delete[] Pointer_To_TestClass->pArray[0][0] // or by simply: Pointer_To_TestClass->pArray[0][0] = NULL; I know the array has data because I can see the results on screen. Also check if it's NULL already, then doesn't try to delete it. Since I want to delete a pointer in another pointer - is