2013-04-24から1日間の記事一覧

「文字⇒数値」はatofでいいわ

C++

sstreamのstringstream使えばいいんだろうけど、こっちの方がタイプ量的に楽。 あとはboost::lexical_cast使えないちゃんの時のために。 #include <iostream> #include <vector> #include <algorithm> //文字列⇒小数の変換ファンクタ struct ToDouble{double operator()(std::string x){re</algorithm></vector></iostream>…