Как добавить к файлу с помощью fstream fstream :: app, похоже, не работает

я просто хочу записать (добавить) в файл журнала. Я посмотрел здесь:
http://www.cplusplus.com/reference/iostream/fstream/open/

, так что я сделал это

#include 

fstream outfile;

//outfile.open("/tmp/debug.txt" );  // works, simply for writing
outfile.open("/tmp/debug.txt", fstream::app );  // does nothing

outfile << "START" << endl;

outfile.close();

19
задан groovehunter 17 January 2011 в 10:43
поделиться