Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ print byte as bit

#include <bitset>
...

char a = -58;    
std::bitset<8> x(a);
std::cout << x << '
';

short c = -315;
std::bitset<16> y(c);
std::cout << y << '
';
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #print #byte #bit
ADD COMMENT
Topic
Name
6+8 =