Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Reassigning to a pointer variable after freeing it – stackoverflow.com

Tags: ptr int

Is this legal to do? Can you assign ptr to something after it has been freed? int * ptr = (int*) malloc(sizeof(int)); free(ptr); ptr = (int *) malloc(sizeof(int));

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot



This post first appeared on ONLINE WEB TRICKS, please read the originial post: here

Share the post

Reassigning to a pointer variable after freeing it – stackoverflow.com

×

Subscribe to Online Web Tricks

Get updates delivered right to your inbox!

Thank you for your subscription

×