#include #define BOOST_FILESYSTEM_VERSION 3 #include “vector”
vector getAllFile(string path, string fileType){ vector files; namespace BFS = boost::filesystem; BFS::path p1(path);
std::cout filesHtml = getAllFile(".\\D", ".html");//抓D目錄下所有html檔案
vector filesTxt = getAllFile(".\\D", ".txt");//抓D目錄下所有txt檔參考:http://viml.nchc.org.tw/blog/paper_info.php?CLASS_ID=1&SUB_ID=1&PAPER_ID=195