-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Program converts expressions to postfix form #10
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут про все проблемы я уже писал, так что пусть будет зачтена --- всё равно в других задачах придётся поправить
bool isPlusOrMinus(char const symbol); | ||
bool isMultOrDiv(char const symbol); | ||
|
||
int infixToPostfix(string const & infix, string & toPostfix) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут возвращается всегда -1 или 0, имеет смысл bool его сделать
#include <iostream> | ||
#include "Stack.h" | ||
|
||
using namespace std; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Нельзя :)
infixToPostfix(infix, postfix); | ||
cout << postfix << endl; | ||
|
||
system("pause"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тоже нельзя :)
@@ -0,0 +1,130 @@ | |||
#include "Infix to postfix.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вообще, кстати, использовать пробелы в именах файлов с исходниками плохая идея, потому что для некоторых систем сборки это может оказаться слишком внезапно. Ну и вообще, пробел обычно разделяет параметры в командной строке, прои пробелы в именах файлов надо специально думать при сборке из консоли.
I made program that converts infix expressions to postfix