Mega Code Archive
Categories
/
C++ Tutorial
/
Bitset
Initialize a bitset with hex number
#include
#include
using namespace std; int main( ){ const int num_lights = 15; const bitset
outside( 0xf ); const bitset
inside( 0xff0 ); const bitset
driveway( 0x7000 ); }