The first character is not getting read by the cout.
cout
string arr[10000]; for(int i=0;i<n;i++) { cin.sync(); cin.ignore(); getline(cin, arr[i]); cout<<arr[i]<<" "; }
Aucun commentaire:
Enregistrer un commentaire