![]() |
#2
linren2008-07-12 22:15
|
//Visual 6.0环境下
# include <iostream>
# include <fstream>
using namespace std;
int main ()
{
ofstream outfile;
outfile.open("f1.dat",ios::out); //为什么我把它改成("e:\c++\f1.dat",ios::out)
if(!outfile) //注:目录没有错。
cout<<"open error !"<<endl;
else
cout<<"open good !"<<endl;
outfile.close();
return 0;
}