Skip to content

examples cpp docs

Tim Paine edited this page Feb 7, 2026 · 1 revision

Calculator Library

Welcome to the Calculator Library documentation. This is an example C++ project demonstrating yardang’s integration with breathe and doxygen.

Overview

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.

Quick Start

#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; } 

Contents

Clone this wiki locally