Junior — Senior
Analysis of potential drawbacks of using push_back in std::vector
livecode
Task condition
It is necessary to identify potential issues associated with using the push_back method when working with the std::vector container.
void vector_method()
{
std::vector<int> vec;
// ========
vec.push_back(1);
vec.push_back(2);
}