diff --git a/tasks/rpn.cpp b/tasks/rpn.cpp index c0c83f28f5d9a9d07b302e9f5e3d1e6e902d50a8..01b5d7e44ab2671be89a0bcd9e6f1378d9c08374 100644 --- a/tasks/rpn.cpp +++ b/tasks/rpn.cpp @@ -8,6 +8,9 @@ std::string rpn_eval(std::string expr) { + int value = 0; + + stack = new Stack(); return expr; } diff --git a/tasks/stack.cpp b/tasks/stack.cpp index d3efc92a35e4fe9b2d0a62b7340904ab1ab53165..ff5d8cc634025388058e6038d5f78cf371943325 100644 --- a/tasks/stack.cpp +++ b/tasks/stack.cpp @@ -13,7 +13,7 @@ bool Stack::pop(int * value) { if(!empty()) { - value = stacks_data[head_of_stack] + value = stacks_data[head_of_stack]; } else { @@ -33,7 +33,7 @@ bool Stack::empty() const } else { - return false + return false; } }