<< i love pointers! what can i help you with? >>
here is my problem, i have broken links everywhere in my linked list.... <sigh>
and you know how it goes with linked list and messed pointers ... one messed up pointer = deleting the whole linked list ....
here is my problem...
//prevNode and tempNode are RowNode objects
public class RowNode
{ public RowNode nextRow;
public int iMyRow;
public CellNode firstCell;
}
here is my lines of code ...
if(newRow == true )
{ prevNode.nextRow = tempNode;
prevNode = tempNode;
tempNode = new RowNode();
newRow = false;
}
if my code worked correctly, i have should have 6 RowNode objects linked together,
But for some reason, my linked list breaks and i have exact *1* RowNode object in my linked list, the very last one ...
any idea what i did wrong in my lines of code?