Top "Push-back" questions

is the action of adding an element at the end of a container.

Vector of structs initialization

I want know how I can add values to my vector of structs using the push_back method struct subject { …

c++ vector struct push-back
How do I pass multiple ints into a vector at once?

Currently when I have to use vector.push_back() multiple times. The code I'm currently using is std::vector<…

c++ c++11 vector push-back
Displaying a vector of strings in C++

I'm sorry if this is a repeat question but I already tried to search for an answer and came up …

c++ vector push-back
vector of vectors push_back

I'm designing a multilevel queue process simulator in C++ but I've got a problem when trying to implement several queues (…

c++ vector process push-back multi-level
Why emplace_back is faster than push_back?

I thought that emplace_back would be the winner, when doing something like this: v.push_back(myClass(arg1, arg2)); …

c++ performance stl push-back emplace
C++ std::string append vs push_back()

This really is a question just for my own interest I haven't been able to determine through the documentation. I …

c++ string append push-back
Vector error , cannot get push_back to work

This is just a snippet of the uncommented code. The packing vector keeps causing an error at the push_back(), …

c++ stl vector push-back
Using push_back on a vector of strings - C++

I am trying to use push_back on a vector of strings in C++. How can I push a single …

c++ string vector push-back
Efficiency of C++11 push_back() with std::move versus emplace_back() for already constructed objects

In C++11 emplace_back() is generally preferred (in terms of efficiency) to push_back() as it allows in-place construction, but …

c++11 move-semantics push-back emplace
Vector pointer and push_back()

If I have void f(vector<object> *vo) { } And I pass the address of a vector to f …

c++ pointers vector push-back