LinkedList problem

Hi everyone,
there seems to be a problem with my hw project but i couln't find out what it is. before posting the code here (the code is a mess, hard to understand not efficient and no comments) i want to point out the problem and hope that you can tell me what could be wrong.

I am basically constructing a 2d, doubly linkedlist, as a 2d matrix.
So, when i'm reading inputs from a file under a member function, it works fine, it constructs the linkedlists fine (i could see the whole list on watch window). but when i call another member function to print the data, the list suddenly disappears, i can't reach any of the nodes anymore. for example, rowPTR[1] doesn't lead to any node while it did when i checked it at the end of construction member function.

any ideas?

edit: i figured out what the problem is. in the main, i construct my object inside a loop, therefore, every turn in the loop the objects is recreated. when i construct the object before the loop, it worked fine.
silly mistake.
Last edited on
Topic archived. No new replies allowed.