Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / Solutions Sem. 03 / ex4 / Bytex.h
blob: fc39e7a1813232917419c97d90e64a124a0f14a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class Bytex {
	char hexVal[2];
	char byteVal;

	char digitToHexChar(unsigned int digit);
	int hexCharToNum(char hexChar);
	void byteValToHex();
	void hexValToByte();

public:
	Bytex();
	Bytex(char byteVal);
	Bytex(const char* hexVal);

	char getByte() const;
	void getHex(char* output) const;
};