Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

convert long int to binary string c++

auto int_bits_size = 32; // maximum number of bits for the integer
auto some_integer = 123456789;
std::string str = std::bitset<int_bits_size>(some_integer).to_string();
 
PREVIOUS NEXT
Tagged: #convert #long #int #binary #string
ADD COMMENT
Topic
Name
1+5 =