24 lines
343 B
C++
24 lines
343 B
C++
#ifndef RPN_HPP
|
|
# define RPN_HPP
|
|
|
|
#include <iostream>
|
|
#include <sstream>
|
|
#include <stack>
|
|
#include <string>
|
|
|
|
class RPN
|
|
{
|
|
public:
|
|
RPN();
|
|
RPN(const RPN &other);
|
|
RPN &operator=(const RPN &other);
|
|
~RPN();
|
|
|
|
int compute(const std::string &string);
|
|
|
|
private:
|
|
std::stack<int> _stack;
|
|
};
|
|
|
|
#endif
|