KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
This question is related to this one . Given this code: char *p = new char[200]; delete[] p; what would happen if you set p[100] = '\0' before deleting p? I had some code where I got a debug error when I tried to delete a not null-terminated char array, something about deleting heap memory that's not assigned. It seemed to delete memory out of the array's bounds.
Tags (comma-separated)
Save Edits
Cancel