От: | Holms | ||
Дата: | 23.09.03 09:44 | ||
Оценка: |
#include <iostream>
#include <fstream>
using namespace std;
void f(??? stream,const char* s)
{
stream << s;
}
int main(int argc, char **argv)
{
fstream f("test.txt", ios::app);
string s;
ostringstream out(s);
f(f,"test");
f(out, "test");
f(cout, "test");
return 0;
}