the new operator

Started by
11 comments, last by jLeslie 23 years, 11 months ago
I haven''t read every line of your code, so maybe there''s some other problem, but these lines in your destructor look wrong:

for (int i = 0;i < NumChildren;i++)
{
if (Children[NumChildren])
delete Children[NumChildren];
}

I think it should be:

for (int i = 0;i < NumChildren;i++)
{
if (Children)
delete Children;<br>}<br><br>Peter<br><br> </i>
Advertisement
OK, the forum has messed it up.
I only wanted to say you should use i to index your array, not NumChildren.

Peter
Ya, that would help wouldn''t it

This topic is closed to new replies.

Advertisement