10/04/17 03:25:07
>>166
ifstreamはテンプレートクラスなので、それでは継承できないのでは?
URLリンク(www.unkar.org) の23~25あたり。
MyClass::test内でstd::basic_ifstreamを継承しcloseを呼び出す例。
template <typename CH>
class MyClass : public std::basic_ifstream<CH>
{
public:
void test(){
this->close();
}
};