-
Notifications
You must be signed in to change notification settings - Fork 292
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
Lab2 #1108
Lab2 #1108
Conversation
LibraryCPPClass/list.cpp
Outdated
{ | ||
current = current->next(); | ||
} | ||
current->set_next(new Item(item->data())); |
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.
Чем это отличается от кода в конструкторе копирования?
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.
В операторе присваивания приходится каждый раз проходить весь новый список до конца
LAB2CPPCLASS/lab2.cpp
Outdated
|
||
if (validReg(value[0]) && value.size() == 1) | ||
{ | ||
cmd.value = value[0]; |
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.
А если добавится такое же число, как код какой-то буквы.
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.
Как отработает команда PUSH 65?
Проблема осталась. |
LAB2CPPCLASS/lab2.cpp
Outdated
{ | ||
case typeCommand::PUSH: | ||
{ | ||
if (cmd.value >= 0 && cmd.value <= 3) |
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.
А если будет просто команда PUSH 2?
Проблема остаётся. |
No description provided.