Re:Guide to Advanced Programming in C
by vinkelhake on Friday February 07, 2014 @10:31AM
(#7196640)
Hi, my point is that you have a bug in the code. Your 'newsize' is the number of elements. When you call realloc (which expects a byte size) you have to take this into account and multiply with the element size. What you have in the code:
should be changed to:
[ Parent
| on HN ]
There are no comments on this comment yet.