vector <string> theWords;
theWords.reserve(100);
istream_iterator <string> stringReader(cin);
istream_iterator <string> stringReaderEOF;
while(stringReader != stringReaderEOF)
theWords.push_back(* stringReader++);
display(theWords);
//reverse(theWords);
INPUT:
samin khan
OUTPUT:
samin
khan
After reversing:
nimas
nahk
How do I reverse the characters?
Aucun commentaire:
Enregistrer un commentaire