有关 fstream 和 ofstream
ofstream file;
file.open( "file.out", ios_base::app );
if( !file )
cout << "error";
这样写是对的.
但我把ofstream 改为 fstream 就错了:
ofstream file;
file.open( "file.out", ios_base::app );
if( !file )
cout << "error";
编译后 运行的结果为 error
难到 fstream 不支持ios_base::app
有人知道为什么吗?