trying to write a program to have a user input a number 1- 25 and display txt.file of names in alphabetical order to an exe.file. lost on the alphabet portion. I still trying to understand <vector>, but any help would be great.
The code I have so far is below.
Thanks,
ifstream inputfile;
int number;
string name;
// open file
inputfile.open ("lineUp.txt");
// get the filename from user
cout << " enter number to get names" << endl;
cin >> number;
if (number <= 0 ){
cout << " Error: Too many numbers try again" << endl;
cin >> number;}
if (number >= 26 ){
cout << " Error: Too many numbers try again" << endl;
cin >> number;}