各位大佬好,我这就是一个c++的简单的文件复制,用的是vs2019,文件里也有lcy.txt ...
#include<fstream>#include<iostream>
using namespace std;
int main()
{
ifstream in;
in.open("lcy.txt");
if (!in)
{
cerr << "打开文件失败" << endl;
return 0;
}
char x;
while (in >> x)
cout << x;
cout << endl;
in.close();
return 0;
} 为什么总提示打开文件失败
页:
[1]