|
-
March 1st, 2009, 12:09 AM
#5
Re: realloc() : invalid pointer ?
 Originally Posted by Paul McKenzie
Code:
values =(int *) realloc(values,10 * sizeof(int));
values=start;
for(i=0 ; i<20 ; i++)
See the problem in red?
Regards,
Paul McKenzie
i willingly set i till 20 because i wanted to see if i'd get any runtime errors because i have deallocated those memory locations...
i dont get any errors.
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
|