私の知る限り、フラグapp
は各書き込みの前
に終了をシークしますconst ios_base :: openmode std :: ios_base ::app[static]各書き込みの前に終了をシークします。
次のプログラム出力は次のとおりです。recostream789
std::string str("t2: 123456789");
std::ostringstream ostr(str,std::ios_base::out|std::ios_base::app);
ostr << "recostream";
std::cout << ostr.str() << std::endl;
出力すべきではありません:t2: 123456789recostream
代わりに?
vs2010を使用しています