Another example int main() { copy(istream_iterator(cin), istream_iterator(), ostream_iterator(cout, "\n")); } Outputs each word input on its own line