C++なら俺に聞け(入門篇)
■ このスレッドは過去ログ倉庫に格納されています
0441デフォルトの名無しさん
2007/01/20(土) 16:05:24独自拡張の出力ストリームを以下のように作成しました。(一部省略)
// 拡張ストリームバッファ
class streambuf2
: public std::basic_streambuf< wchar_t, std::char_traits< wchar_t > >
{
public:
// 必要最低限の仮想関数をオーバーライド
}
// 拡張ostream
class ostream2
: public std::basic_ostream< wchar_t, std::char_traits< wchar_t, > >
{
private:
streambuf2 m_sb2;
public:
ostream2()
: std::basic_ostream< wchar_t, std::char_traits< wchar_t, > >( &m_sb2 )
{
}
// 特にオーバーライド無し
}
つづく
■ このスレッドは過去ログ倉庫に格納されています