2006-02-23から1日間の記事一覧
static変数は怖い。摩訶不思議。 const char* func(){ static std::string s; s = GetHoge(); return s.c_str(); }を const char* func(){ static std::string s = GetHoge(); return s.c_str(); }にすると期待どうりに動かないだろう。2/24 返り値の型まち…
static変数は怖い。摩訶不思議。 const char* func(){ static std::string s; s = GetHoge(); return s.c_str(); }を const char* func(){ static std::string s = GetHoge(); return s.c_str(); }にすると期待どうりに動かないだろう。2/24 返り値の型まち…