Im working on an application using a linked list.
The user enters a number and this is added as a new link in the linked list.
The user can then decide to display all the data in the links of the linked list.
If the user enters the following numbers in this order:

1
2
3
4

the application will display:

4
3
2
1

This is fine, i think, as a linked list works with Last In First Out. (am i right?)

I can also write the contents to a text file..... and they are written in the order that they are displayed in. That is:

4
3
2
1

Now here is my problem, the application can read each number from the text file and re-input them into the linked list, the problem is that they are being entered in the wrong sequence as the application starts from the BOF (ie. 4). After reading from the text file, if i display the contents of the linke dlist, they are shown as:

1
2
3
4

This is wrong!!!
Any ideas please?