C++判断文件是否存在
#include
<
fstream
>
#incude < iostream >
bool bFileExist = false ;
std::fstream _file;
_file.open(strFilePath, std::ios:: in );
if (_file)bFileExist = true ;
_file.close();
#incude < iostream >
bool bFileExist = false ;
std::fstream _file;
_file.open(strFilePath, std::ios:: in );
if (_file)bFileExist = true ;
_file.close();