Hello everybody!
Can anyone help me with this thing : I want to know how I can sort alphabetically the lines in a text file, by that I mean what method can I use, being a beginner
Thanks!
I would learn about the STL (standard template library).
In the example below I am using a STL container (vector), STL algorithms (for_each and sort) and STL iterators with for_each and sort (v.begin() and v.end()). Also at the end of the for_each I am using a new feature of C++0x/C11 (lambdas) to print out the values.