2009-06-10から1日間の記事一覧

2進数表示

C++

JavaのInteger#toString()みたいに、基数を指定して文字列に変換ってないのかなー。 #include <iostream> template<class T> void println_binary(T x) { static const char * const table[] = { "0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111", "1000", "100</class></iostream>…