超级版主
注册日期: 04-03
帖子: 18592
精华: 36
现金: 249466 标准币
资产: 1080358888 标准币
|
C++中有没有删除文件及文件夹操作的函数?
用API函数:
DeleteFile删除文件
函数原型
BOOL DeleteFile(
LPCTSTR lpFileName // pointer to name of file to delete
);
例如:
。。。。。。。。。。。。。
DeleteFile("C:\\Windows\\Desktop\\Example.TXT");
。。。。。。。。。。。。。
删除目录RemoveDirectory
函数原型:
BOOL RemoveDirectory)
LPCTSTR lpPathName //point to directory to remove
);
举例:
..........................
RemoveDirectory("C:\\TestDir");
|