Declare a bit in C++

There is none. The smallest addressable entity is a byte. This is the char or unsigned char type. (The best type is the integer because it is aligned to the width of your processor and thus fastest to fetch and work on)

To work with bits you need to use boolean operators and mask/shift your data in the larger types. Or work with STL bitsets.

Leave a Comment