判断文件是否存在及创建文件夹

来源:互联网 发布:魔兽世界单机版 知乎 编辑:程序博客网 时间:2024/04/25 14:50
 CString  strFilePath =  "C:\\Documents and Settings\\Administrator\\桌面\\Image Mosaic Result"; /*判断文件夹是否存在*/ if (!PathFileExists(strFilePath)) {  /*创建文件夹*/  if (!CreateDirectory(strFilePath, NULL))  {     AfxMessageBox("Image Mosaic Result文件夹创建失败!");  } } strFilePath += "\\epipolar.jpg"; string s; s.append(strFilePath.GetBuffer(strFilePath.GetLength())); strFilePath.ReleaseBuffer(); imwrite(s, tmp);


 

原创粉丝点击