VC雕虫小技集(七)[3]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 he_zhidan 的 blog

binlcude a所在的文件

 

6, 删除文件夹及包含的文件

#include <direct.h>

void deletedirfile(cstring spath)

{

       win32_find_data fd;

       handle hfind = ::findfirstfile(spath + "*.*",&fd);

      

       if (hfind != invalid_handle_value)

       {           

              while (::findnextfile(hfind,&fd))

              {

                     //判断是否为目录

                     if (fd.dwfileattributes&file_attribute_directory)

                     {

                            cstring name;

                            name = fd.cfilename;

                            //判断是否为...

本文关键:VC 雕虫小技集
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top