C++ cout 进制输出

输出 16进制:web cout << hex << 100 << endl; 输出 10进制:svg cout << dec << 100 << endl; 输出 8进制:spa cout << oct << 100 << endl; 输出 2进制:code #include <bitset> cout<< bitset<sizeof(int)*8>(十进制变量) <<endl;
相关文章
相关标签/搜索