От: | MaximE | ||
Дата: | 19.09.03 08:05 | ||
Оценка: |
#include <sstream>
#include <fstream>
#include <iterator>
#include <algorithm>
int main()
{
using namespace std;
stringstream s("bla-bla-bla");
ofstream f("test.txt");
copy(
istreambuf_iterator<char>(s),
istreambuf_iterator<char>(),
ostreambuf_iterator<char>(f)
);
return 0;
}