标签:cpp windows closed line code cti window class struct
#include <sys/types.h>#include <dirent.h>std::vector<std::string> get_all_filename(char* dirname){ DIR *dp; struct dirent* dirp; std::vector<std::string> filename_vector; if((dp = opendir(dirname)) == NULL) { printf("this dir maybe not exist"); } while((dirp = readdir(dp)) != NULL) { filename_vector.push_back(dirp->d_name); } closedir(dp); return filename_vector;}标签:cpp windows closed line code cti window class struct
原文地址:http://www.cnblogs.com/fushou/p/7269951.html