B
Bharat Bhushan
Hi,
I have a link list which I am attempting to print using the following loop.
LinkList tmp = Head;
while((tmp.Next != null)){
print("Nodes Number: "+tmp.Index);
}
Now the problem is that with this loop, I am missing the last node. Apart
from having the print("Nodes Number: "+tmp.Index); statement after the loop,
I can't get it to print the last node from the loop itself.
Any pointers??
Regards,
- Bharat.
I have a link list which I am attempting to print using the following loop.
LinkList tmp = Head;
while((tmp.Next != null)){
print("Nodes Number: "+tmp.Index);
}
Now the problem is that with this loop, I am missing the last node. Apart
from having the print("Nodes Number: "+tmp.Index); statement after the loop,
I can't get it to print the last node from the loop itself.
Any pointers??
Regards,
- Bharat.