C++判断文件是否存在

C++判断文件是否存在

#include  < fstream >
#incude 
< iostream >

bool  bFileExist  =   false ;
std::fstream _file;
_file.open(strFilePath, std::ios::
in );
if  (_file)bFileExist  =   true ;
_file.close();

你可能感兴趣的:(C++判断文件是否存在)