Skip to content
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

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

viktoriia-fomina
Copy link
Owner

I made program that converts infix expressions to postfix

@viktoriia-fomina viktoriia-fomina changed the title Program converts infix expressions to postfix Program converts expressions to postfix form Nov 3, 2018
Copy link

@yurii-litvinov yurii-litvinov left a 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)

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;

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");

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"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вообще, кстати, использовать пробелы в именах файлов с исходниками плохая идея, потому что для некоторых систем сборки это может оказаться слишком внезапно. Ну и вообще, пробел обычно разделяет параметры в командной строке, прои пробелы в именах файлов надо специально думать при сборке из консоли.

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.

2 participants