in the below mentioned code the compiler is showing error in getline(cin,s[i])
#include
#include
#include
using namespace std;
int main()
{
int n;
cin>>n;
cin.get();
string s;
for(int i=0;i<n;i++)
{
getline(cin,s[i]);
}
sort(s,s+n);
for(int i=0;i<n;i++)
cout<<s[i];
return 0;
}