Search:

Type: Posts; User: hankspears

Search: Search took 0.01 seconds.

  1. Thread: strdup

    by hankspears
    Replies
    4
    Views
    3,216

    Great, no memory leaks now. Thanks to my hirsute...

    Great, no memory leaks now.
    Thanks to my hirsute friend for sorting that one out.
  2. Thread: strdup

    by hankspears
    Replies
    4
    Views
    3,216

    I have a function that goes like this: List...

    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 =...
  3. Thread: strdup

    by hankspears
    Replies
    4
    Views
    3,216

    strdup

    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...
  4. Replies
    3
    Views
    1,785

    That's got rid of the leaks, thanks Prelude. I...

    That's got rid of the leaks, thanks Prelude. I guess I was making it too complicated.
  5. Replies
    3
    Views
    1,785

    delete whole tree

    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 {...
  6. Thread: makefiles

    by hankspears
    Replies
    13
    Views
    1,662

    I just wondered what those lines of code in my...

    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...
  7. Thread: makefiles

    by hankspears
    Replies
    13
    Views
    1,662

    Wow, 9 replies, I thought, must be something...

    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...
  8. Thread: makefiles

    by hankspears
    Replies
    13
    Views
    1,662

    makefiles

    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'...
  9. I guess this is stuff we haven't done yet. Linked...

    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...
  10. turning strings of unknown length into arrays

    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;...
  11. Replies
    6
    Views
    1,876

    The key word there is actually command...

    The key word there is actually command (singular);)
  12. Replies
    6
    Views
    1,876

    OK, I thought there would be a nice easy command...

    OK, I thought there would be a nice easy command to do it, but I guess not.
    thanks for your help...
  13. Replies
    6
    Views
    1,876

    dynamic mem alloc of 2-d arrays

    So, anyone know how to create a 2-d array using calloc? It seems to have been overlooked in my book.
  14. Replies
    5
    Views
    1,795

    multiply defined variables

    :confused:

    but what if you are doing an assignment that encourages you to use headers???

    is the #ifndef - #endif loop not working?
Results 1 to 14 of 14