From eb7e3391c2a095b714be61e78cb9fc558e0d931b Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 1 Apr 2026 23:19:40 +0300 Subject: [PATCH] Fixed code not computing the special operation properly --- input_resolver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/input_resolver.cpp b/input_resolver.cpp index c7f6457..003eaac 100644 --- a/input_resolver.cpp +++ b/input_resolver.cpp @@ -47,10 +47,10 @@ ValidationResult validate_token(const std::string &token) if (digitpos == -1) - return {true, ' ', 0}; + return {true, token[0], 0}; int next = stoi(token.substr(digitpos)); - return {true, ' ', next}; + return {true, token[0], next}; } Command resolveCommand() @@ -72,7 +72,7 @@ Command resolveCommand() for (const char c: token) { - static const std::string operators {"+-*/%"}; + static const std::string operators {"+-*/%$"}; if(operators.find(c) != operators.npos) { operation = c;