Skip to content

fix cpp09#1

Open
stanX19 wants to merge 1 commit intocyan-wings:mainfrom
stanX19:main
Open

fix cpp09#1
stanX19 wants to merge 1 commit intocyan-wings:mainfrom
stanX19:main

Conversation

@stanX19
Copy link

@stanX19 stanX19 commented Dec 31, 2025

This pull request makes a minor logic fix and a small formatting change in the RPN.cpp file for the Reverse Polish Notation calculator. The main update ensures that the input parsing function correctly validates non-empty input, and there is also a minor reformatting for readability in the compute function.

Input validation improvement:

  • Modified RPN::parseInput to return true only if at least one valid token is parsed, preventing empty input from being considered valid.

Code readability:

  • Reformatted variable declarations and stack operations in RPN::compute for improved clarity, with no change to logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant