GCC 4.1.2 不支持用 ios_base::in | ios_base::app 模式打开文件。可以使用的替代方案是:
fstream fs("test.txt");
fs.seekp(0, ios::end);
详细讨论请见:
Can not open file with "ios_base::in | ios_base::app"
Google 网上论坛: comp.lang.c++
fstream fs("test.txt");
fs.seekp(0, ios::end);
详细讨论请见:
Can not open file with "ios_base::in | ios_base::app"
Google 网上论坛: comp.lang.c++