as stated
Printable View
as stated
Have you tried using your debugger?
It is extremely helpful when your program compiles fine, but does not behave as you expect it to.
You can check variable values, and set breakpoints to stop your code execution at certain points to narrow down your problem to a more specific area of the code.
sorry i don't even know how to use debugger.. and i am just stuck at that point...
* Sigh *
I am starting to think that my college is the only one in the United States (perhaps the world) that teaches people how to use their debugger to solve coding problems.
Perhaps I am just expecting too much, but I just can't see how you could possibly learn how to program without knowing how to use a debugger.
It just doesn't make any sense. They go hand in hand.
There is no possible way I could have passed any of my upper level/advanced computer science courses without knowing how to use a debugger. So it kinda makes me scratch my head when someone tells me they don't know how to use one.
In any case, perhaps I will take a look. No guarantees though.
thx man...
Can anyone figure out the problem for mE?
Thank You
dcjr84, have you figured out? Thank You
some changes that should make it work:
*1st case should only test "*head == NULL" and not the other condition
*while loop should test for "while(temp)"
*3rd case should insert into "prev->next" instead of "temp->next"
in fact, 1st case can be combined into the 2nd case; and 3rd case can be combined into the 4th case, if you want
also, you can eliminate 1st/2nd cases if you insert a dummy node at the front; but this is your choice
Take a look at this sample linked list implementation : http://learningcppisfun.blogspot.com...nked-list.html
What compiler are you using?
Well... i got it working, but i am facing few other problems now... it won't write more than two names if there's space between name( such John Smith). Also after exiting program and excuting program again to edit, it won't display right, also it won't write back to file....
I asked about your compiler and you did not answer. There should be a debugger with it. Also, I don't understand : when you say it is working - what is working? what is not working? what part of code does what?Can you put cout statements to see what is happening? Check each of the variables. After reading and writing and print the list as soon as it is modified to see if that is okay. You should be able to narrow down to the code that is causing the problem.Quote:
Originally Posted by SushiMania
Okay i updated the file, and also i am using visual studio 2005 .... and i do not know how to use debugger... i am sorri, but i never learned how to use it... maybe after the finals.. i will... thx a lot for carin guys...
Can Somebody Please Help Me With This?
Currently, your code is unavailable... If other want to help, you've to post your code or attach it to one of your messages.
Seems that the original poster removed his original post. As such, there is not further value to this thread for anyone. I've closed it.
Please do not remove the original questions after they have been answered or responded to. Others may find value in them.
Thanks,
Brad!