2014-04-18 8 views
0

C++ 입문서 4th 8.8.1 섹션 :C++이 NO 인 이유 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 

아무도 이유를 말해 줄 수 있습니까? 고마워.

답변

0

짧은 대답은 : C++ 스트림을 복사하거나 재 지정하는 것이 의미가 없습니다. 진짜 질문은 무엇입니까? 정확하게 달성하려는 것은 무엇입니까?