I found an error I think you should fix. Last line in InsertAtBack, shouldn't you be modifying lastNode and not firstNode? After that the linked-list works as it should, except it will print 32 when you call printfromlefttoright. That is because in that method you told it to print lastNode.
HTH
Reputation Points: 975
Solved Threads: 140
Posting Virtuoso
Offline 1,624 posts
since Feb 2007