【发布时间】:2014-06-02 13:34:47
【问题描述】:
在 C++ 入门第 4 节 8.8.1 部分中:
为什么 IO 对象没有复制或分配?
ofstream out1, out2;
out1 = out2; // error: cannot assign stream objects
ofstream print(ofstream); // error: can't initialize the ofstream parameter
out2 = print(out2); // error: cannot copy stream objects
谁能告诉我原因?非常感谢。
【问题讨论】:
标签: c++ io iostream istream ostream