int main() { Calc* c = new Calc(); c->Add(3); c->Add(4); c->Add(9); cout << "sum: " << c->GetSum(); delete c; }
int main() { Calc calc; calc.Add(5).Sub(3).Mul(4); std::cout << calc.getValue() << "\n"; }