使用_access(path, 0)
std::string imgPath("F:\\hablee_copy\\img_cap_2023_11_06_15_02_21_097\\cap_1.BMP");
char sz_imgPath[256];
sprintf(sz_imgPath, imgPath.c_str());
if ((_access(sz_imgPath, 0)) == -1) {
sprintf(sz_imgPath, "%s is not exist\r\n", sz_imgPath);
std::cout << sz_imgPath << std::endl;
}