
-----------------------------------
Raknarg
Thu Jan 29, 2015 11:09 am

Mystery error. Need help.
-----------------------------------
I'm working on an assignment. Here is the piece of code in question that doesn't work:


void Brig::addPirates(int numPirates) {
	cout  To debug constructor / destructor calls, it can be very helpful to print out where they occur.

I did have something like that before, I removed it all after I found something that worked though. Putting in 'this' is a good idea though, I'll remember that

-----------------------------------
DemonWasp
Fri Jan 30, 2015 10:08 am

RE:Mystery error. Need help.
-----------------------------------
> Why use deleteMyClass then delete  will delete all entries before deleting the array itself. However, if the array is MyClass* then delete  will just delete the array, and not any of the entries it points to.
