erxuan
January 27th, 2005, 06:32 PM
I use
vector<string> Names;
copy(istream_iterator<string>(cin), istream_iterator<string>(),back_inserter(Names));
....other code...
to read strings from cin stream.
The problem is I don't know how to terminate the input stream and run the code below it. I tried Enter,"Ctrl+D"...but the screen remain the status of receiving the input...
vector<string> Names;
copy(istream_iterator<string>(cin), istream_iterator<string>(),back_inserter(Names));
....other code...
to read strings from cin stream.
The problem is I don't know how to terminate the input stream and run the code below it. I tried Enter,"Ctrl+D"...but the screen remain the status of receiving the input...