basic-calculator 1.0.0
Basic Calculator
Loading...
Searching...
No Matches
main.cpp File Reference
#include <iostream>
#include <sstream>
#include <vector>
#include <stack>
Include dependency graph for main.cpp:

Go to the source code of this file.

Data Structures

class  Solution
 

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 129 of file main.cpp.

130{
131 Solution sol;
132 string s = "(1+(4+5+2)-3)+(6+8)";
133 // string s = " 21-1 + 28 - 8-2";
134 try
135 {
136 sol.calculate(s);
137 //cout << s << " = " << sol.calculate(s) << endl;
138 }
139 catch (const std::runtime_error& ex)
140 {
141 cout << ex.what() << endl;
142 }
143 return 0;
144}
int calculate(string s)
Definition main.cpp:27

References Solution::calculate().