【C++】STL(Standard Template Library)相談室 9 at TECH
[2ch|▼Menu]
477:デフォルトの名無しさん
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

4962日前に更新/192 KB
担当:undef