タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

boostとC++に関するyohshiyのブックマーク (1)

  • letsboost::format

    sample サンプルの動作確認バージョン [GCC4.4/1.41.0] [VC9/1.41.0] #include <iostream> #include <boost/format.hpp> using namespace std; int main() { // %1%が一番目のパラメータ、%2%が二番目のに置き換わります。 cout << boost::format("%1% %2%") % "hello" % 100 << endl; // printfと同じ書式もOK。 // %05d:0埋めで5桁の整数 %x:16進表記 %f:浮動小数点数 %%:%そのもの cout << boost::format("%05d %x %f %%") % 200 % 255 % 3.33 << endl; // さらに、%2%と%1%を逆順に使うことも cout << boost::for

  • 1