64,654
社区成员
发帖
与我相关
我的任务
分享
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
system("cmd /c dir F:\\shared\\*.txt /a-d /b /s >c:\\allfiles.txt");
ifstream myfile("c:\\allfiles.txt");
char buffer[1024];
while (! myfile.eof() )
{
myfile.getline (buffer,1024);
cout<<buffer<<endl;
}
system("pause");
return 0;
}