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

Добавить pop_back() параметр - количество удаляемых элементов #596

Open
perfectGenius opened this issue Jun 4, 2024 · 0 comments

Comments

@perfectGenius
Copy link

perfectGenius commented Jun 4, 2024

Да, можно сделать вектор.resize(вектор.size() - N);, но ведь тогда можно это делать и для последнего элемента, т.е. pop_back() становится ненужным. Но он есть и сильно упрощает код. И так же было бы проще писать и видеть вектор.pop_back(N);
Или тогда название уже не будет соответствовать?

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

No branches or pull requests

1 participant