Advertisement
Guest User

RPN

a guest
Nov 19th, 2015
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #pragma once
  2. #include <string>
  3. #include <memory>
  4. #include <vector>
  5. #include <stack>
  6.  
  7. using namespace std;
  8.  
  9. class ReversePolandNotation
  10. {
  11. private:
  12.     int getPriority(char character);
  13.     bool isAlphaNum(string  str);
  14.     bool isDigit(string  str);
  15.     vector<string> * parseFormula(string * input);
  16. public:
  17.     ReversePolandNotation();
  18.     string performCalculation(string formula);
  19.     string evaluateFormula(vector<string> * formula);
  20.     //string evaluateStingFormula(vector<string> * formula);
  21.     ~ReversePolandNotation();
  22. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement