1. Fixed that now, thanks.
2. I cleaned this up. It had been that way because of how some of my functions worked, but I see now that they no longer need to be global.
3. This is an assignment for a...
Type: Posts; User: Panserbjorn
1. Fixed that now, thanks.
2. I cleaned this up. It had been that way because of how some of my functions worked, but I see now that they no longer need to be global.
3. This is an assignment for a...
I know I've been asking 1000 questions and most of them are simple answers, but I've tested this one extensively and still cannot figure out what the deal is (cue still simple answer).
My code...
Thanks, worked like a charm.
I've searched for this, but I can't find an explanation anywhere.
I have a linked list, and a node currentPtr.
currentPtr has a variable in it "data" which is a string.
How do I add that...
Awesome!! You just helped me fix the biggest problem I had! Now, a new issue is coming up, though. Now the last item input into the linked list doesn't show up in the list. In the test file,...
Woops, tried
strcpy(newPtr->data,value)
like it should be. Still get segmentation fault.
I changed that line to
strcpy(value,newPtr->data);
and now I just get a segmentation fault. I didn't think that was an issue, since when I print the linked list, it shows strings at each node.....
I'm getting a classic example of printing out a linked list but all nodes contain the value of the last inserted node. I've seen some information about this , but I still cannot figure out how to...
I see your point here. I should've checked to see if something existed before I wrote my own.
Yep, it was right in my code, but I messed it up when trying to get rid of my debugging code.
...
Heh.. you bet.
Well, I figured out why I was getting odd results for the linked list.. the printList command was printing %c instead of %s. However, new problem. The test file I'm using starts with this:
When...
I'm working on a program to justify a block of text. The step I'm stuck on now (haven't gotten to the justification part), is reading in the text file into a linked list of strings. I'm 99% sure I...