Thank you all for your help :D
Type: Posts; User: Mandy_C
Thank you all for your help :D
oh ok .. so as the function is now, if ive understood you correctly, the memory allocated to the node is cleared?
so, is there any other way to check the memory is deallocated or is it down to...
ok, i understand that function...i think.
i have tried it, and it compiles and runs through the function but i dont think it is deallocating the memory.
i have used the code from cdalten like this:...
thanks for the posts...i dont quite understand the function tho :confused:
here is my whole code so far:
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct node
yes, i intend to run the function just before the program closes so i can avoid memory leaks.
so i dont need to bother about relinking the nodes on either side, i just need to remove everything
Hi everyone,
i am trying to deallocate the memory for i linked list i allocated using malloc. but i cannot seem to clear the nodes.
here is the relevant parts of my program:
struct node
{...
Of course !!! i shudda known that!!!
:D
Thanks alot anyway, Salem, saved me once again!!!
great - thanks, it now works like that :)
but i havent agot a clue how i can display integers with a '0' in front.
i.e. 8 is displayed as 08
does any body have an idea?
thanks
Hi guys,
i would like to convert a 4 digit number (eg 0824) into a time so that i can find the length of time between two times.
=> so 0824 and 0927 gives 1 hour and 3 minutes
i have found a...
Thats awesome thank you sooo much :)
this part of the program is working good now :)
thanks a lot!!!
Thank you for your help Salem, i have corrected the function to expect a char array character array. btu i still am unable to get the information from the linked list. when the program runs the...
Hi everyone,
I'm new to this site and also a beginner at C programming, I was wondering if anyone could help me with this problem that I have involving a linked list.
I always get a 'bus...