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();
posted on 2007-11-07 11:08 楊粼波 閱讀(3283) 評(píng)論(2) 編輯 收藏 引用