remove函数
string strPath = "";
strPath = "..//bin//image02//" + strNameList[i];
if (remove(strPath.c_str()))
{
;
}
remove中成功返回0 失败返回-1
先判断目录是否存在,如果不存在则创建
对应的头文件
#include <io.h>
#include <direct.h>
//先判断目录是否存在,如果不存在则创建
if (_access(strPath.c_str(), 0))//头文件io目录存在返回零
{
::_mkdir(strPath.c_str());//头文件direct
}