#include <bitset>
...
char a = -58;
std::bitset<8> x(a);
std::cout << x << '
';
short c = -315;
std::bitset<16> y(c);
std::cout << y << '
';
#include <bitset>
...
char a = -58;
std::bitset<8> x(a);
std::cout << x << '
';
short c = -315;
std::bitset<16> y(c);
std::cout << y << '
';
Code Example |
---|
Cpp :: c++ default parameters |
Cpp :: combine two vectors c++ |
Cpp :: how to get the size of a vector in c++ |
Cpp :: reading file c++ |
Cpp :: size of stack in c++ |
Cpp :: 2-Dimensional array in c++ |
Cpp :: how to split a string in c++ |
Cpp :: C++ String Length Example |
Cpp :: pointer address to string |
Cpp :: checking if a string has only letters cpp |
Cpp :: c++ array rev pointer |
Cpp :: back() in c++ |
Cpp :: throw exception c++ |
Cpp :: c++ modulo positive |
Cpp :: how to append to a vector c++ |
Cpp :: c++ average |
Cpp :: bubblesort c++ |
Cpp :: function in struct c++ |
Cpp :: implementing split function in c++ |
Cpp :: binary search c++ |
Cpp :: iterate over map c++ |
Cpp :: pure virtual function in c++ |
Cpp :: c++ in cmd |
Cpp :: c++ doubly linked list |
Cpp :: c++ elif |
Cpp :: getline() |
Cpp :: c++ program to find lcm of two numbers |
Cpp :: break statement in c++ program |
Cpp :: comparator priority queue c++ |
Cpp :: uparam(ref) |