Sparse matrix addition help, linked list

I'm trying to add two linked list of sparse matrix, B added to A.
But it doesn't work that well and crash sometimes. i have no idea what went wrong. So far for the equal there's no problem at all. Been trying to fix this for almost a day, couldn't figure out what went wrong. anyone?


Last edited on
anyone can help?
anyone??
Try to provide a minimal testable code that does reproduce your problem.
Comment your approach (better variable names would help too)

Use a debugger to figure out the exact line of code where your program crashes


By the way, ¿why don't you use `std::list'? your doesn't encapsulate the nodes (I'll assume that there is no issue in its implementation)
Topic archived. No new replies allowed.