#get_at function in a DoubleLinkedList; assertions are failing - why?

1 messages · Page 1 of 1 (latest)

gritty dockBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

vivid dune
#

i == size() is already out of bounds. Consider a list with 0 elements and someone requesting element 0.

#

You should also try to post a complete example. There is a chance it's an error in some add function you're not showing.

#

Also use a debugger, it should be able to show you the state of the list.

gusty willow
#

@gaunt dragon do you know what the problem might be?

vivid dune
#

Oh, right. Apparently I didn't pay attention.

gaunt dragon
#

the get_at function is legit

gritty dockBOT
#

@gusty willow Has your question been resolved? If so, run !solved :)

gusty willow
#

!solved

gritty dockBOT
#

Thank you and let us know if you have any more questions!

This thread is now set to auto-hide after an hour of inactivity