I'm trying to make a program which can input elements (integers) and sort them, then input them in a txt file.
I've made the functions (write on file, read from file, sorting elements), but now I need the following..
When I use a file on which I have unsorted numbers, when I open this file the elements from the txt file to be called in to something (array or pointer.. I don't know) and to call the sorting function. Then after sorting I need to write the elements back in the file.
The problem is that I don't know how to take the elements and convert them into an integer.
Can someone help me or give me info?