!
,不管符號位還是數字位;
#include<iostream> int_i = ; char_i = int_i; float_i = char_i; bool_i = float_i; cout << showpoint << int_i << << char_i << << float_i << << bool_i <<
給短數!這種情況。
#include<iostream><bitset><iomanip> int_i = char_a =<< int_i <<<< char_a << <()*> bin_i(int_i); bitset<()*> bin_a(char_a); cout << setw() << bin_i <<<< setw() << bin_a <<
#include<iostream><bitset><iomanip> short_i = long_i =<< short_i <<<< long_i << <()*> bin_short_i(short_i); bitset<()*> bin_long_i(long_i); cout << setw() << bin_short_i <<<< setw() << bin_long_i << short_j = - long_j =<< short_j <<<< long_j << <()*> bin_short_j(short_j); bitset<()*> bin_long_j(long_j); cout << setw() << bin_short_j <<<< setw() << bin_long_j <<
:
#include<iostream><bitset><iomanip> unsigned_int_i = signed_int_j =<< unsigned_int_i <<<< signed_int_j << <(unsigned )*> bin_i(unsigned_int_i); bitset<(signed )*> bin_j(signed_int_j); cout << setw() << bin_i <<<< setw() << bin_j <<