forked from python-project-templates/yardang
-
Notifications
You must be signed in to change notification settings - Fork 0
examples cpp docs
Tim Paine edited this page Feb 7, 2026
·
1 revision
Welcome to the Calculator Library documentation. This is an example C++ project demonstrating yardang’s integration with breathe and doxygen.
The Calculator Library provides basic arithmetic operations including:
- Addition
- Subtraction
- Multiplication
- Division
It also includes a ScientificCalculator class with advanced operations like power and square root.
#include "calculator.hpp" int main() {
calc::Calculator calc;
double sum = calc.add(5.0, 3.0);
// 8.0
double diff = calc.subtract(10.0, 4.0); // 6.0
double prod = calc.multiply(3.0, 4.0); // 12.0
double quot = calc.divide(15.0, 3.0); // 5.0
return 0; }