to_ulong
语法:
1 |
?? unsigned long to_ulong(); |
to_ulong()返回bitset的无符号长整数形式。
1 2 3 4 5 6 7 8 9 10 |
//源代码 /** ? *? @brief Retuns a numerical interpretation of the %bitset. ? *? @return? The integral equivalent of the bits. ? *? @throw? std::overflow_error? If there are too many bits to be ? *?????????????????????????????? represented in an @c unsigned @c long. */ unsigned long to_ulong() const { return this->_M_do_to_ulong(); } |
测试代码:
测试结果:
0010000010
130
10000100
132
请按任意键继续. . .