# Exploring C++: The Programmer's Introduction to C++

## Project 4, Exploration 68: Calculator

The calculator project is the most complicated one, being the last. I recommend following the six steps I outline in Exploration 68. The files below show the evolution of my solution as I follow the six steps. The parser undergoes the greatest change, although its central spirit remains the same throughout all steps.

In this project, I use Boost.Test for the unit-testing framework. The project was just too complicated for the trivial test.hpp file that other projects use. If you do not have access to Boost for any reason, do not compile the tester program, only the calc program.

See also the main projects page.

- Step 1: simple parser, arithmetic expressions
  - parser header file
  - parser source file
  - calculator main source file
  - Documentation
  - Directory
- Step 2: add variables and assignment
  - parser header file
  - parser source file
  - calculator main source file
  - variables header file
  - variables source file
  - Documentation
  - Directory
- Step 3: store and evaluate parse trees
  - parse tree node header file
  - parse tree node source file
  - node implementation header file
  - node implementation source file
  - parser header file
  - parser source file
  - calculator main source file
  - variables header file
  - variables source file
  - Documentation
  - Directory
- Step 4: define simple functions
  - parse tree node header file
  - parse tree node source file
  - node implementation header file
  - node implementation source file
  - parser header file
  - parser source file
  - calculator main source file
  - variables header file
  - variables source file
  - Documentation
  - Directory
- Step 5: save and load libraries
  - parse tree node header file
  - parse tree node source file
  - node implementation header file
  - node implementation source file
  - parser header file
  - parser source file
  - calculator main source file
  - variables and library header file
  - variables and library source file
  - Documentation
  - Directory
- Step 6: support additional data types
  - parse tree node header file
  - parse tree node source file
  - node implementation header file
  - node implementation source file
  - number header file
  - number source file
  - number implementation header file
  - number implementation source file
  - parser header file
  - parser source file
  - calculator main source file
  - variables and library header file
  - variables and library source file
  - Documentation
  - Directory