Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualBrother Bob

Posted 26 January 2013 - 05:57 PM

You need to call delete for everything you call new for. You call new for ptr[x], for each x in the array, so you need to call delete for ptr[x] as well.
for(int x=0; x<10; ++x) {
    delete ptr[x];
}

#1Brother Bob

Posted 26 January 2013 - 05:56 PM

You need to call delete for everything you call new for. You call new for ptr[x], for each x in the array, so you need to call delete for ptr[x] as well.

for(int x=0; x<10; ++z) {
    delete ptr[x];
}

PARTNERS