#include <fstream>
#include <iostream>
#include <stdlib.h>//declare exit in line 13
using namespace std;//declare cerr endl ifstream cout ect;
int main()
{
ifstream ifs("lix.txt",ios::in);
if(!ifs){
cerr<<"Error:unable to open file"<<endl;
exit(1);
}
else{
cout<<"I find the file"<<endl;
}
}
c++ 读取文件
最新推荐文章于 2024-08-16 16:51:12 发布