i need to sort a text file (it could be increasing or decreasing) years.
the text file includes
#of entries
nameofwar: year\n
how can I sort the text file with out the use of vectors, algorithms.
for (int i=0; i<sizxefile;i++) //i know to run a for loop to go over the entire file
//and to print it would be
cout<<array[i].title<<":"<<array[i].year:
but how do I print them pout in order?
thank you so much in advance!