请看看为什么这个文件删除不了?
string myclino = filename.substr(0, clipos - 1);
strcpy_s(clino, myclino.size() + 1, myclino.c_str());
string xlsfilename = filename + ".xls";
string xlsfilefullpath = pathstr + xlsfilename;
ifstream xlsfile(xlsfilefullpath);
if (xlsfile.good())
{
if (remove(xlsfilefullpath.c_str()) != 0)
{
RARCloseArchive(rarFile);
RARCloseArchive(rarFile2);
const char * errcstyle = "删除相关解压缩后的EXCEL文件出错,程序终止";
strcpy_s(errmsg, strlen(errcstyle) + 1, errcstyle);
return -6;
}
}
xlsfilefullpath 的值为 D:\\cpptestnew\\unrartestapp\\Debug\\tempdata\\A012库存20171120.xls
但删除不了,不知道什么原因