【C++】STL(Standard Template Library)相談室 9at TECH
【C++】STL(Standard Template Library)相談室 9 - 暇つぶし2ch477:デフォルトの名無しさん
08/05/08 15:07:11
>>475
class my_string : public std::string {
bool m_is_null;
public:
my_string() : m_is_null(true) {}
operator=(const char* p) { if (p==NULL) set_null() else set_string(p); }
operator=(const std::string& s) { set_string(s); }
void set_null() { m_is_null = true; clear(); }
void set_string(const std::string& s) { m_is_null = false; *this = s; }
bool is_null() { return m_is_null; }
}


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch