-
difference between
-
ate
allow seek to other position, whileapp
not. When usingapp
all writes are preceeded by seeks.
ios::ate
and
ios::app
stringstream iss(string("hello world"));
vector<string> words;
// stream -> container
copy(istream_iterator<string>(iss), istream_iterator<string>(), back_inserter(words));
// container -> stream
copy(words.begin(), words.end(), ostream_iterator<string>(cout, " "));