Hello every one I have a question that I am sure you have seen a million times but I am not wanting code. I am writing a dynamic array class for an assignment. The book wants an add entry function that creates a new dynamic array copies everything from the first into the second and adds the entry to the end of the new array, increments the size and deletes the old one. Well I kept getting a memory corruption error after the program printed out what it was suppose to and was ending.I commented out the delete statement in the function and it was gone. This drove me crazy for a while until I just got an idea and please correct me if i am wrong but what i think is happening is that the delete statement in the add entry function is deleting the old array and the programs ends and calls the destructor which again tries to delete what is already gone. If I am correct do I even need to add that delete statement if the destructor is being called anyway because if I comment out the delete in the destructor but leave in the statement in the function it runs fine and vise versa. I hope this rambling will make since to some of you. I will post a little of this to hopefully help with what I am trying ask. Thanks for your time.