c++ 判断文件是否存在

bool isFileExists_fopen(string& name) {
	if (FILE *file = fopen(name.c_str(), "r")) {
		fclose(file);
		return true;
	}
	else {
		return false;
	}
}

  

原文地址:https://www.cnblogs.com/liutianrui1/p/13954525.html