I am a beginner at C++ but this is a lab we have to do and I have no idea what libraries, algorithms, process on how to start this exercise, etc. Please help.
Design a program that allows the user to enter 20 names into a String array. Sort the array in ascending (alphabetical) order and display its contents.
#include <iostream>
#include <string>
usingnamespace std;
string Array[20];
int main()
{
cout << "Start Here and work off of me!" << endl;
for(int i=0; i<20; i++)
{
cout<<"Please Enter Name "<<i+1<<endl;
cin>>Array[i]; ///Asks user to enter The names
cout<<endl;
}
for(int i=0; i<20; i++)
{
cout<<"Name "<<i+1<<" is:"<<endl;
cout<<Array[i]<<endl; ///Repeats The names
}
return 0;
}