Answer the question
In order to leave comments, you need to log in
How to reduce the memory reserved for a vector in c++?
...
vector<int> myvector(int);
myvector.reserve(1000) // зарезервируем место под 1000 элементов
...
myvector.reserve(10) // все равно зарезервированно место под 1000 эллементов
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question