The code is
Vect::~Vect()
/*
PRE: None
POST: free pVect
*/
{
cout << "(__|| - DELETE (unlock the memory for): " << (*this) << endl;
// Put code below ....
}
Basically, I need it to correctly free pVect so that my other fuctions can work.
Also there is a .h file with this double* pVect;
It would have been nice if you'd provided a full but minimally-producable example to start with. Let's try this:
Make sure you keep
pVectequal to anullptrunless it contains a valid address. Which means you absolutely should give it a default value like I did.