展开全部
#include <iostream>
#include <fstream>
using namespace std;
#define FILENAME "XXXX.XXX"
int main()
{
fstream _file;
_file.open(FILENAME,ios::in);
if(!_file)
{
cout<<FILENAME<<"not exist!";
}
else
{
cout<<FILENAME<<"already exist!";
}
return 0;
}
#include <fstream>
using namespace std;
#define FILENAME "XXXX.XXX"
int main()
{
fstream _file;
_file.open(FILENAME,ios::in);
if(!_file)
{
cout<<FILENAME<<"not exist!";
}
else
{
cout<<FILENAME<<"already exist!";
}
return 0;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询