|
-
March 1st, 2009, 12:07 AM
#3
Re: realloc() : invalid pointer ?
 Originally Posted by Lindley
What you are doing wrong is
in the loop. After that, values no longer points to the array returned by malloc(), so it is improper to pass it to realloc.
However, your start pointer should still be pointed at the proper location. Try passing that instead.
thanks. i forgot about that basic point.
Also, no program may be considered correct if it does not free() all allocated memory before program termination.
that point taken too! thanks.
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
|