Project was inspired by sencalc. This calculator is intended to be cross-platform with some extra features, compared to its predecessor.
Calculator supports evaluating of expressions, mixing decimal, octal, hexadecimal, character and binary numbers like:
101i * (2fh & 3o) - 10 + "32\nf"
Base numbers are set according to preffixes or suffixes, listed in the following table:
Base | Prefixes | Suffixes |
---|---|---|
Binary | i, b | |
Octal | 0 | o |
Hex | 0x | h |
ASCII (char) input should be enclosed with double quotes. Ascii supports specials symbols, like: \r \n \t. For representing '\' and '"' characters, use '\\' and '\"' accordingly.
Decimal numbers are used by default and don't have any distinguishing features, like suffix or prefix. Calculator is case-insensetive, hence both 10h and 10H mean the same number.
Project consists of library (ohbcalc), console application (cohbcalc) and gui application (gohbcalc)
Core library, providing all the calculations.
Console application, that uses ohbcalc library for calculating. Result is shown in bases: decimal, hexadecimal, octal and binary.
Gui application, similar to cohbcalc. Output is the same as in cohbcalc application, but with the character one.
Compiler with c++14 support.
Compiler with c++17 support. Supported systems: Windows, Linux
Compiler with c++14 support, Qt5.
Project supports only cmake 3.0+ build.
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build . --target check
$ cmake --build .