几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   vc编程 (http://www.dimcax.com/hust/forumdisplay.php?f=76)
-   -   C++中有没有删除文件及文件夹操作的函数? (http://www.dimcax.com/hust/showthread.php?t=628)

huangyhg 2007-04-03 02:05 PM

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");


所有的时间均为北京时间。 现在的时间是 10:59 PM.