C_CPP/src/07_STD/MP/BinaryOctet.h

24 lines
644 B
C

#ifndef C_C_BINARYOCTET_H
#define C_C_BINARYOCTET_H
const int bitsPerOctet = 8;
struct BinaryOctet {
bool evenParity;
char bitsAsDigits[bitsPerOctet]{};
explicit BinaryOctet(int x = 0);
BinaryOctet(const BinaryOctet&) = default;
const BinaryOctet operator--(int);
const BinaryOctet operator++(int);
bool operator!=(BinaryOctet &a);
bool operator==(const BinaryOctet &a);
bool operator <(const BinaryOctet &a);
bool operator>=(BinaryOctet &a);
BinaryOctet operator-(BinaryOctet a);
BinaryOctet operator+(BinaryOctet a);
BinaryOctet operator/(BinaryOctet &a);
};
#endif //C_C_BINARYOCTET_H