Program stops at delete

My program stops executing at the line where I delete dynamically allocated memory in a function of a class.

 
     delete [] array;


array is a member of the class and a pointer to a char array. I don't get an error message when I compile it, but if I debug it, it stops at that line and says that there's an exception. What am I doing wrong?

Does it tell you what kind of exception? Are you sure the pointer is not dangling (i.e. points to memory that has already been deallocated)?
@cpp1024

Post the whole code and we will be able to help you.
Topic archived. No new replies allowed.