1.vc中有什么命令是删除文件的
WINAPI中提供有 DeleteFile()函数: HRESULT DeleteFile([in,string]LPCWSTR wsFile); Deletes the given file from the destination site. wsFile---Address of a null-terminated string that contains the name of the file to delete. --------------------------------------------------------------。
2.VC删除当前文件夹指定文件
删除文件可以使用API涵数
DeleteFile()
例如:
CString StrDestFile="C:\\删除文件.ini";
if(::DeleteFile(StrDestFile))
MessageBox("删除文件成功");
else
MessageBox("删除文件失败");
}
我们可以先获取到当前文件夹的目录,
可以用GetCurrentDirectory();
然后在删除里面的文件利用DeleteFile();
以后遇到不懂的欢迎百度给我留言,我只擅长Win32 平台下
转载请注明出处51数据库 » 删除文档wordvc
比尔盖茨svip