To sort an input file and write it as multiple files
As part of my mini project, there is a portion where i need to:
a. Read an input file input.txt - The file will have 100 - 200 lines.
b. Segregate the data based on the first character of each line and
write it into separate files i.e. all the lines starting with alphabet
'a' or 'A' should be in file Aa.txt.
c. The data in each file should be sorted in alphabetical order
d. The input file name should be accepted as a command line parameter
The code should be in c++.