Do I need to free the old pointer that I pass to realloc?
Thanks any help!
Do I need to free the old pointer that I pass to realloc?
Thanks any help!
Nothing more to tell about me...
Happy day =)
Nope. If the allocated block is moved then it will release the old block.
You should if realloc fails.Originally Posted by gustavosserra
7. It is easier to write an incorrect program than understand a correct one.
40. There are two ways to write error-free programs; only the third one works.*