iostream 객체를 가지고 있으면
실제 인스턴스가 fstream이든 stringstream이든 상관 없습니다.
(oop니 당연한거지만)
문제는 다음과 같은 상황을 C++ 표준 객체인 iostream 따위를
상속해서 구현하고 싶습니다. 그런데 막상 자료가 충분치 않습니다.
구현하고자 하는 내용.
상속 받은 객체가 각각 zistream, zostream, ziostream일 때,
[code:1]
zistream zis;
zis.open("압축된파일.gz");
if (!zis.is_open()) return false;
ofstream ofs;
ofs.open("평문파일.txt");