同意楼上...
之所以比CFile::remove快捷是因为它不用任何类,直接用就可以

解决方案 »

  1.   

    C++中
    int   remove(const   char   *filename); 
    boost中
    在C++库boost里有独立于OS平台的filesystem   class   
      对于删除整个文件夹或者删除单个文件,举例:   
      //////////////////////////////   
      //   
      //   boost::filesystem   
      //   filesystem   remove   remove_all   
      //   
      //////////////////////////////   
        
      #include   <boost/filesystem/operations.hpp>   
      int   main(int   argc,   char**   argv)   
      {   
      if   (   argc   !=   2   )   return   EXIT_FAILURE;   
      boost::filesystem::path   path_(   argv[1]   ); //   define   path   of   file   or   directory;   
      int   removed   =   boost::filesystem::remove_all(   path_     ); //   remove   entire   directory;     
      //boost::filesystem::remove(   path_   ); //   remove   single   file;   
      return   EXIT_SUCCESS;   
      }