0
在C++ primer中第4节8.8.1章节:为什么C++没有为IO对象复制或分配?
为什么没有复制或分配给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
有谁能告诉我原因吗?非常感谢。