掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
文字列をコンテナに格納するには? (ID:68247)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
おぼえがき。 > typedef std::string String; typedef std::basic_string<TCHAR> String; とするが吉でしょう。 > void cHSP::InsertEZMenu(int id, LPCTSTR filePath) { > String str(filePath); > menuMap.insert(std::pair<int, String>(id, str)); >} void cHSP::InsertEZMenu(int id, LPCTSTR filePath) { menuMap.insert(std::pair<int, String>(id, filePath)); } で十分。LPCTSTRから暗黙のコンストラクトが行われます。
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.