文件流一个奇怪的问题
#include<iostream>
#include<fstream>
int main()
{
using namespace std;
ofstream of("c:\\test.txt",ios_base::app|ios_base::out);
if(!of)
{
cerr<<"open file failed"<<endl;
return -1;
}
of<<"ffffffffffffff";
return 0;
}
为什么“ffffffffffffff”不能写入文件?我用的是vs.net 2003阿,vc6下却可以