Recently, I made a new friend.His name is _expand, and we\'ve had some nice conversations, and I\'ve even hung out with him a few times.But when I started asking around, no one had ever heard of my _e
From what I understand because malloc dynamically assigns mem , you need to free that mem so that it can be used again.
I came up with this code with the help of @GWW and now I can\'t free a char**. Here\'s my code (it just reads an input file and prints the names in it on the screen):
A garbage data appears whenever i write the data in the text file... Why is it like that? Here\'s my code... Thanks
I\'m trying to create a C array of objective C NSStrings using malloc.I\'m not doing it right, but I don\'t think I\'m far off.Maybe someone can point me in the right direction.
I have a function that returns a pointer to an array. I\'m running it in a loop and free() seems to be giving me problems. I\'m not sure where, but it appears that somewhere in the main loop the memor
In C++, you can arrange for a function to be called whenever new fails.Is there a way to have a function called whenever malloc fails?Assume that malloc is being called from third-party libraries that
There is a function in my application in which memory is allocated for formatting a port name.CreateFile is called to open the port.At the end of the function free is called to attempt to free the all
Good day! I need to use malloc in creating a student list system.... In order to be efficient, our professor asked us to use it on a struct so i created a struct as follows:
I am having a problem when free(position) is run. void printTree(nodeT node, int hieght) { int *position;