RPN.hpp
1 /* ************************************************************************** */ 2 /* */ 3 /* ::: :::::::: */ 4 /* RPN.hpp :+: :+: :+: */ 5 /* +:+ +:+ +:+ */ 6 /* By: gychoi <gychoi@student.42seoul.kr> +#+ +:+ +#+ */ 7 /* +#+#+#+#+#+ +#+ */ 8 /* Created: 2024/01/10 22:01:31 by gychoi #+# #+# */ 9 /* Updated: 2024/01/12 17:21:50 by gychoi ### ########.fr */ 10 /* */ 11 /* ************************************************************************** */ 12 13 #ifndef __RPN_HPP__ 14 #define __RPN_HPP__ 15 16 #include <cstdlib> 17 #include <list> 18 #include <sstream> 19 #include <stack> 20 #include <stdexcept> 21 22 class RPN 23 { 24 private: 25 RPN(); 26 RPN(RPN const& other); 27 RPN& operator=(RPN const& other); 28 ~RPN(); 29 30 public: 31 static int execute(char* expr); 32 33 private: 34 static std::stack<int, std::list<int> > sStack; 35 }; 36 37 #endif /* __RPN_HPP__ */