Skip to content

first commit - #1

Open
0NeR wants to merge 4 commits into
mainfrom
feature/solve_first_homework
Open

first commit#1
0NeR wants to merge 4 commits into
mainfrom
feature/solve_first_homework

Conversation

@0NeR

@0NeR 0NeR commented Nov 12, 2022

Copy link
Copy Markdown
Owner

No description provided.

Comment thread homework_01/task_01/src/utils.cpp Outdated
std::vector<std::string> words;
std::string word = "";
int check_int = 0;
for (char const &symbol : data) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

общепринято писать const char&

Comment thread homework_01/task_01/src/utils.cpp Outdated
if (check_int == 0) {
if (symbol == '(') {
check_int = 1;
} else if (symbol != ' ' and symbol != '\t') {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

В C++ не принято писать and и or, используй вместо && и ||

Comment thread homework_01/task_01/src/utils.cpp Outdated
word.clear();
}
return {words};
}; No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

добавь пустую строку, так принято, и в остальных файлах

Comment thread homework_01/task_01/src/utils.cpp Outdated
};
if (check_int == 1) {
if (symbol != ')') {
word.push_back(symbol);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

можно вынести из if (symbol != ')') тогда этот if вообще уйдет

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