c语言读入文件排序,帮忙-如何对文件排序啊
生活随笔
收集整理的這篇文章主要介紹了
c语言读入文件排序,帮忙-如何对文件排序啊
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
該樓層疑似違規(guī)已被系統(tǒng)折疊?隱藏此樓查看此樓
樓主加分哦,看看吧
#include #include //#include #include #include using namespace std;void dfsFolder(string folderPath){ _finddata_t FileInfo; string strfind = folderPath + "\\*.*"; long Handle = _findfirst(strfind.c_str(), &FileInfo); cout<
do{ //判斷是否有子目錄 if (FileInfo.attrib & _A_SUBDIR) { //這個語句很重要 if( (strcmp(FileInfo.name,".") != 0 ) &&(strcmp(FileInfo.name,"..") != 0)) { string newPath = folderPath + "\\" + FileInfo.name; dfsFolder(newPath); } } else{ cout<
void main(){string foldPath="d:\\huang";//ofstream fout;dfsFolder(foldPath);}
總結
以上是生活随笔為你收集整理的c语言读入文件排序,帮忙-如何对文件排序啊的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 24c语言程序设计是啥,《C语言程序设计
- 下一篇: ODP.net与Oracle连接