Search:

Type: Posts; User: mjpam

Search: Search took 0.01 seconds.

  1. Thread: Linked list help

    by mjpam
    Replies
    18
    Views
    1,933

    Thank you. That's seems to have worked in so far...

    Thank you. That's seems to have worked in so far as the program no longer segfaults when it's in that function. It now segfaults in another function.

    Nearest I can figure, is that there is...
  2. Thread: Linked list help

    by mjpam
    Replies
    18
    Views
    1,933

    Ooops...sorry. I must have accidentally deleted...

    Ooops...sorry. I must have accidentally deleted it while condensing the code.

    I originally had:


    bldList (spListData, spModList, &ptLnkList);

    but
  3. Thread: Linked list help

    by mjpam
    Replies
    18
    Views
    1,933

    I'm beginning to think that I just don't...

    I'm beginning to think that I just don't understand how pointers work as well as I thought I did.

    The way I implemented the suggestion that I pass a pointer to a pointer to the linked list...
  4. Thread: Change function

    by mjpam
    Replies
    19
    Views
    17,981

    You're very right that the rest of your post was...

    You're very right that the rest of your post was very helpful, but I was just trying to point out that using pointers is necessary if he is trying pass (is that the correct terminology, claudiu?) for...
  5. Thread: Change function

    by mjpam
    Replies
    19
    Views
    17,981

    Yeah, sorry. I mean "pass", I think.

    Yeah, sorry. I mean "pass", I think.
  6. Thread: Change function

    by mjpam
    Replies
    19
    Views
    17,981

    It's not necessarily overcomplicated if he has to...

    It's not necessarily overcomplicated if he has to use a function to calculate the change. In that case, it would best to use a function that returns all four numbers at once rather than four...
  7. Thread: Linked list help

    by mjpam
    Replies
    18
    Views
    1,933

    Oh, I didn't mean to imply that it was difficult....

    Oh, I didn't mean to imply that it was difficult. It's just that I've been at it for a very long time today, and sometimes makes me miss very basic things.

    And I do appreciate that you want me to...
  8. Thread: Linked list help

    by mjpam
    Replies
    18
    Views
    1,933

    Thank you for your help. I'm sorry for my...

    Thank you for your help.

    I'm sorry for my carelessness. I understand that it is very difficult to try to help people who don't seem to be considering the consequences of their actions.

    I did...
  9. Thread: Linked list help

    by mjpam
    Replies
    18
    Views
    1,933

    Maybe I'm implementing it wrong. void...

    Maybe I'm implementing it wrong.


    void bldList (FILE* spListData, FILE* spModList, struct node* ptLnkList)
    {
    int i;
    struct node* ptNew; //pointer to new node
    struct node* ptCur;...
  10. Thread: Linked list help

    by mjpam
    Replies
    18
    Views
    1,933

    I understand why using feof() is not a a good...

    I understand why using feof() is not a a good choice for a control conditions. I've tried other conditions and they didn't work. For instance, fscanf(spListData, "%d%*c ", ptNew -> listEl) != EOF and...
  11. Thread: Linked list help

    by mjpam
    Replies
    18
    Views
    1,933

    Thank you for your answer, but that wasn't the...

    Thank you for your answer, but that wasn't the only problem. When I assigned ptNew to ptCur instead of ptCur -> link, the program went into an infinite loop.

    The other solution was to change the...
  12. Thread: Linked list help

    by mjpam
    Replies
    18
    Views
    1,933

    Linked list help

    I am having trouble with a programming assignment in which I have to read a file, create a singly linked list, delete the nodes from the list, and print the modified list.

    My biggest problem so...
  13. Replies
    2
    Views
    1,445

    Help reading file streams

    I would appreciate some help with reading input input file streams into data structure.

    First, so that I can demonstrate that I understand the basics of reading input file streams I present a code...
Results 1 to 13 of 13