首页 > 其他 > 详细

删除文件

时间:2021-06-23 20:53:58      阅读:15      评论:0      收藏:0      [点我收藏+]


#include <iostream>

#include <Windows.h>

#include <fstream>

#include <sstream>

using namespace std;

int main()
{

FILE * fp;


int flag = 0;
char * tmp;
static char tmpstr[1024];

if ((fp = fopen("temp.txt", "r")) == NULL)
{
cout << "temp.txt doesn‘t exist" << endl;

}
else
{
fclose(fp);

system("DEL /f temp.txt");
cout <<"Delete info.txt and temp.txt Sucessful !" <<endl;
system("pause");

}

return 0;
}

删除文件

原文:https://www.cnblogs.com/wang-xiao-shuai/p/14923712.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!