I'm getting a classic example of printing out a linked list but all nodes contain the value of the last inserted node. I've seen some information about this , but I still cannot figure out how to apply it to my situation. I've attached my code and the test file I've been using. The output I've been getting when I print the linked list is something along the line of:
markets -> markets -> markets -> markets -> (ad nauseum)
It would be greatly appreciated if someone could take a look. I've been stuck on this issue for hours.