fstream fio("test4.txt", ios::in | ios::out);
if (!fio)
{
cout << "文件打开失败" << endl;
}
为什么总是显示文件打开失败。
fstream fio("test4.txt", ios::out);
if (!fio)
{
cout << "文件打开失败" << endl;
}
这样就可以创建一个文件
if (!fio)
{
cout << "文件打开失败" << endl;
}
为什么总是显示文件打开失败。
fstream fio("test4.txt", ios::out);
if (!fio)
{
cout << "文件打开失败" << endl;
}
这样就可以创建一个文件
![](http://hiphotos.baidu.com/%BB%F0%CE%E8%D1%FD%BA%FC/pic/item/048ca2faa5117766242df265.jpg?v=tbs)