Search:

Type: Posts; User: thoseion

Search: Search took 0.01 seconds.

  1. Replies
    13
    Views
    12,419

    Thanks for your help mate - I've actually got it...

    Thanks for your help mate - I've actually got it adding to the content list OK now, but with the problem I mentioned about the files being added to the wrong directory. The files are added to the...
  2. Replies
    13
    Views
    12,419

    I've tried simply adding to lp->content instead...

    I've tried simply adding to lp->content instead of the main list, and it appears to work OK in that when I print the main list, no filenames are printed. But I keep getting a seg fault when trying...
  3. Replies
    13
    Views
    12,419

    The sections that use stat were actually given to...

    The sections that use stat were actually given to me like that, along with the code fragment you've highlighted. Surely that code can return something other than 0? If s = ".." then it will fail...
  4. Replies
    13
    Views
    12,419

    Adding directory/file names to a linked list

    I'm attempting to write a program whereby it gets the name and path of all directories and files and adds them to a linked list. The list structure should hold the name/path for a directory, then...
  5. I believe the problem is due to a simple variable...

    I believe the problem is due to a simple variable naming error - you've named your character array val3 but when you send it to AddToList, your actually sending val2.
  6. Replies
    6
    Views
    1,685

    OMG!! That missing '=' was the problem all...

    OMG!! That missing '=' was the problem all along! Can't believe I've spent the best part of a whole day trying to get that working and it was because I missed out an operator!

    Thanks a lot for...
  7. Replies
    6
    Views
    1,685

    Yeah, I had it commented out while I was error...

    Yeah, I had it commented out while I was error checking (pretty much clutching at straws trying to find out what was going wrong!) , I didn't mean to leave it in the code I posted.

    I've edited my...
  8. Replies
    6
    Views
    1,685

    Hi mate, I've edited it as per your suggestions...

    Hi mate, I've edited it as per your suggestions but it still crashes as soon as I run the program :(
  9. Replies
    6
    Views
    1,685

    Sorting a linked list

    Nearly there with getting this program finished but I've run into another problem - my program keeps crashing after trying to implement a merge sort. It all compiles OK but crashes as soon as I run...
  10. Replies
    1
    Views
    1,602

    lol nevermind - after posting the thread I...

    lol nevermind - after posting the thread I noticed I was missing the "==0" in the line "if (strcmp(ptr->words, word) == 0){" :p
  11. Replies
    1
    Views
    1,602

    Searching/counting in a linked list

    Thanks to Prelude, I've nearly got my program doing what it's meant to - just have one more annoying problem that I'm sure is down to my simple stupidity...

    I am trying to add words from a...
  12. Help with storing and displaying strings in linked list!

    I'm new to C programming and so I'm having some problems with a simple program I'm trying to code. Essentially I'm trying to read in a text file, store the individual words into a linked list, then...
Results 1 to 12 of 12