|
-
October 28th, 2009, 02:19 PM
#1
Problem with delete operator
Hello,
I have a source code like this:
void func()
{
char* str;
str=new char[5*sizeof(char)];
.
.
.
delete line;
}
When the program get to the "delete line", It shows the following error:
Debug assertion failed!
expression: _BLOCK_TYPE_IS_VALID(phead->nblockuse)
Why does I get the error message?
As I understand, I can use the delete operator for every varabile that was allocated with the "new" operator...
Thnk you,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|