0

I have a doubly linked list and I know it gets created with the proper values. For some reason when I run through my print function it, only prints 1/2 of the list and then gives me this:

the instruction at "0x7c93426d" referenced memory at "0x00000000". the memory could not be "read".

I'm assuming it's trying to reference a NULL pointer but I dont know how 1/2 the list gets printed and the other 1/2 all of a sudden is NULL. Are there any common problems associated with printing linked lists like this?

Thanks

2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Barefootsanders
0

Also, btw, when I change the number of elements in the list and attempt to print that it works.. strange.

0

Post the code which
- creates nodes
- adds them to the list
- prints the list.

There's nothing strange when it's implemented correctly, so I'm just going with there are bugs in your code.

0

Hey sorry. You were right and I was implementing it incorrectly. I was passing a NULL pointer to my print function and it crashed. Thanks for the input.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.