/* * bitwise.h * * Created on: 28.03.2013 * Author: trifon */ #ifndef BITWISE_H_ #define BITWISE_H_ typedef char bitwise; int const BITS = sizeof(bitwise) * 8; class Bitwise { bitwise x; public: Bitwise(bitwise _x = 0) : x(_x) {} void print() const; bool getBit(int i) const; void setBit(int i); // to 1 void resetBit(int i); // to 0 }; #endif /* BITWISE_H_ */