Great, no memory leaks now.
Thanks to my hirsute friend for sorting that one out.
Type: Posts; User: hankspears
Great, no memory leaks now.
Thanks to my hirsute friend for sorting that one out.
I have a function that goes like this:
List ListRemove(List list, Contents * item)
{
Node *searchNode, *prevNode;
/* look at each node until found item */
for(searchNode =...
I'm having a few problems with memory leaks in my linked list. I think the problems may be with the strdup() function. We've been given this so I don't know how it works. I looked at the old entries...
That's got rid of the leaks, thanks Prelude. I guess I was making it too complicated.
I'm having a bit of bother deleting an entire tree. I can't seem to delete the root node and bcheck tells me I have leaks all over the place.
We've been given the structs:
typedef struct TNode {...
I just wondered what those lines of code in my first post actually did - particularly the bit about 'lib'. I also don't know where the libtree.so file came from. I should be able to make up a batch...
Wow, 9 replies, I thought, must be something useful there......never mind.
Er, to go back to your original question shadow, it's not a very big program - 4 main files, about 350 lines total.
I...
I'm trying to figure out how this makefile works. Can anyone help me? We've been given a makefile that works with gcc and I'm trying to get it to work with borland cc. I guess I need to change 'gcc'...
I guess this is stuff we haven't done yet. Linked lists seem to come up on this board all the time, so I should probably try and learn about them soon.
Thanks for your help guys...
How do I read a string into an array without either fixing the length of the string or getting the user to enter the length first?
I thought this kind of thing might do it, but no joy:
char *H;...
The key word there is actually command (singular);)
OK, I thought there would be a nice easy command to do it, but I guess not.
thanks for your help...
So, anyone know how to create a 2-d array using calloc? It seems to have been overlooked in my book.
:confused:
but what if you are doing an assignment that encourages you to use headers???
is the #ifndef - #endif loop not working?