| www.delorie.com/archives/browse.cgi | search |
| From: | deepblack AT geocities DOT com (Luís Coelho) |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Class undestructible !!! |
| Date: | Sat, 07 Mar 1998 22:56:37 GMT |
| Organization: | Instituto Superior Tecnico |
| Lines: | 19 |
| Message-ID: | <3501cec0.14934428@news.ist.utl.pt> |
| References: | <6dpdau$6ql AT everest DOT vol DOT it> |
| NNTP-Posting-Host: | ppp09.ist.utl.pt |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
I think that your destructor should read:
matrice::~matrice()
{
for (int x = 0; x < righe() ; x++)
{
delete membro[x];
}
delete[] membro;
}
^^^^
membro as allocated as
membro = new double*[x];
Hope it helped.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |