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...
Type: Posts; User: mjpam
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...
Ooops...sorry. I must have accidentally deleted it while condensing the code.
I originally had:
bldList (spListData, spModList, &ptLnkList);
but
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...
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...
Yeah, sorry. I mean "pass", I think.
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...
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...
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...
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;...
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...
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...
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...
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...