alsav22
5434 / 4829 / 442
Регистрация: 04.06.2011
Сообщений: 13,587
|
02.09.2013, 19:34
|
|
C++ | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| #include <cstdlib>
#include <iostream>
#include <fstream>
#include <string>
#include <sstream>
using namespace std;
int main ()
{
system("dir > dir.txt");
fstream fin("dir.txt");
if (!fin) cout << "Error!" << endl;
else
{
stringstream s;
s << fin.rdbuf();
string str = s.str();
cout << str << endl;
fin.close();
}
system("pause");
return 0;
} |
|
2
|