c language wrote:
> Hi All,
>
> I have written a C++ program, it can be compiled (in UNIX) but when I
> run it, I usually gives the following errors:
>
> free(): invalid pointer 0x51d4a0!
> free(): invalid pointer 0x51d460!
> free(): invalid pointer 0x51d760!
> free(): invalid pointer 0x51d7e0!
>
> Can anyone help me to know what is the reason for this problem?
Why don't you try posting your question, along with a small, complete,
compilable example that demonstrates your issue, to comp.lang.c++. It
is very difficult to know exactly what the problem is without seeing
your code although, and I am going out on a limb here, you may be
trying to free an invalid pointer (i.e. a pointer that was not returned
to you by malloc and friends).
Robert Gamble
|