C++ bitset to_ullong() 用于将 bitset 的内容转换为无符号长整型。它返回一个 unsigned long long,其整数值与 bitset 的位设置相同。 用法 unsigned long long to_ullong(); 参数 它不带任何参数。 返回值 它返回一个与 bitset 对象具有相同位表示的整数值。 例子1 #include <iostream> #include <bitset> ...
std::bitset<N>::to_ullong From cppreference.com unsignedlonglongto_ullong()const (since C++11) (constexpr since C++23) Converts the contents of the bitset to anunsignedlonglonginteger. The first bit of the bitset corresponds to the least significant digit of the number and the last bit ...