От: | Dmi_3 | ||
Дата: | 10.10.05 21:36 | ||
Оценка: |
class text_out{
std::ostream& out;
public:
text_out(std::ostream& File) : out(File) {}
~text_out(){out<<"done"<<std::endl<<std::flush;}
text_out const& operator<<(int x) const { out<<x; return *this; }
};
int main(){
text_out(std::cout) << 1 << 2 <<3;
return 0;
}