エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
C++ string <-> double, int 等の変換
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
C++ string <-> double, int 等の変換
文字列string から数字 double, int 等の変換は sstreamを使うことで案外簡単にできることが分かった。 ... 文字列string から数字 double, int 等の変換は sstreamを使うことで案外簡単にできることが分かった。 #include <string> #include <sstream> double string2double(const std::string& str){ double rt; std::stringstream ss; ss << str; ss >> rt; return rt; } std::string double2string(double d){ std::string rt; std::stringstream ss; ss << d; ss >> rt; return rt; }