A simple calculator entirely on C++ and CMake capable of performing the most fundamental arithmetic operations using the Elements C++ GUI library
- Addition, subtraction, multiplication, division, power, and nth root
- Nested parentheses support
- Integers and decimals
- CMake
- Windows SDK Version 10
- Visual Studio 16 2019
- Elements C++ GUI library https://github.com/cycfi/elements
- Clone the repo:
git clone https://github.com/javierramoss/Calculator.git
- cd to the Calculator folder and create a
build
folder. - cd to the
build
folder and open the command prompt. - Compile using (change the
DELEMENTS_ROOT
path to where the elements library resides):
cmake -G"Visual Studio 16 2019" -DELEMENTS_ROOT=”../elements” ../
- cd to the lib folder and use the following commands to import the LinkedLib library to the project:
git submodule init
git submodule update
- Go back to the main folder and open the
Calculator.sln
in Visual Studio. - Add the calculator.cpp file to the solution under source files if not present.
- Remove all the solutions in Visual Studio excepts for
elements
andcalculator
. - Build all.
Press the buttons or type directly into the display to write an arithmetic operation. To compute the answer simply press the =
button.
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b NewBranch
) - Commit your Changes (
git commit -m 'Add x'
) - Push to the Branch (
git push origin NewBranch
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.