2016-07-30から1日間の記事一覧

数値の頭に0を詰めて桁を揃える

C++

数値の頭に0を詰めて桁を揃える - My Life as a Mock Quant のC++版をやりたい。 #include <iostream> #include <iomanip> #include <string> #include <sstream> int main() { // 現状保存 std::ios::fmtflags curret_flag = std::cout.flags(); //123の頭に5個0を詰めて8桁にする std::ostrings</sstream></string></iomanip></iostream>…