3 ms·
> Once the vector is constructed, we can only add elements one by one by using the push_back member function. Nope... std::vector::insert() takes an std::initi
by mehrdadn 6y ago
> Once the vector is constructed, we can only add elements one by one by using the push_back member function.
Nope... std::vector::insert() takes an std::initializer_list [1].
[1] https://en.cppreference.com/w/cpp/container/vector/insert https://en.cppreference.com/w/cpp/container/vector/insert