Read From File into a Linked List

Posted 09 May 2010 - 01:36 PM

I am having difficulty reading into a linked list information from a text file. When I run the program I am using while(!dataFile.eof()) to keep my loop going but it is only reading in the top four lines in my text file. I need it to continue loading text from the file into new structures until it reaches the end of the file. I have pasted my function below. Any suggestions would be appreciated.

Re: Read From File into a Linked List

Posted 09 May 2010 - 01:51 PM

Thanks for the help! I've been trying to solve this problem for a few hours now and a textbook that I have is not much help. It seems to be getting caught in a possible infinite loop. I tried your modifications but same problem. I enclosed the whole code with my function commented out to see if that helps any.