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

Lab2 #1108

Closed
wants to merge 39 commits into from
Closed

Lab2 #1108

wants to merge 39 commits into from

Conversation

voxnord
Copy link

@voxnord voxnord commented Nov 21, 2024

No description provided.

LAB2CPPCLASS/lab2.cpp Show resolved Hide resolved
{
current = current->next();
}
current->set_next(new Item(item->data()));
Copy link
Owner

Choose a reason for hiding this comment

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

Чем это отличается от кода в конструкторе копирования?

Copy link
Author

Choose a reason for hiding this comment

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

В операторе присваивания приходится каждый раз проходить весь новый список до конца


if (validReg(value[0]) && value.size() == 1)
{
cmd.value = value[0];
Copy link
Owner

Choose a reason for hiding this comment

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

А если добавится такое же число, как код какой-то буквы.

Copy link
Owner

Choose a reason for hiding this comment

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

Как отработает команда PUSH 65?

@Dovgalyuk
Copy link
Owner

Проблема осталась.

{
case typeCommand::PUSH:
{
if (cmd.value >= 0 && cmd.value <= 3)
Copy link
Owner

Choose a reason for hiding this comment

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

А если будет просто команда PUSH 2?

@Dovgalyuk
Copy link
Owner

Проблема остаётся.

@Dovgalyuk Dovgalyuk closed this Dec 26, 2024
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