Top "Stdvector" questions

std::vector is a contiguous sequence container in the C++ standard library.

How to remove duplicates from unsorted std::vector while keeping the original ordering using algorithms?

I have an array of integers that I need to remove duplicates from while maintaining the order of the first …

c++ duplicates stdvector stl-algorithm stdset
boost::python: Python list to std::vector

Finally I'm able to use std::vector in python using the [] operator. The trick is to simple provide a container …

python boost boost-python stdvector
Is begin() == end() for any empty() vector?

I have long assumed that for any empty std::vector V, V.begin() == V.end(). Yet I see nothing in …

c++ stdvector
Unresolved externals in C++ when using vectors and find

I have tried this code in a totally separate project, and it works fine (the only difference being that the …

c++ find stdvector unresolved-external
Moving a vector element to the back of the vector

Is there any better way (either faster or with fewer symbols of code) than erasing the element and re-adding it …

c++ vector stdvector
Pointers to elements of std::vector and std::list

I'm having a std::vector with elements of some class ClassA. Additionally I want to create an index using a …

c++ stl pointers stdvector
lower_bound of vector of pairs with lambda

I want to find the std::lower_bound of the a std::vector of std::pair's according to the second …

c++ lambda stdvector std-pair
Convert vector of uint8 to string

I have a pointer to a vector of type uint8. How would I take this pointer and convert the data …

c++ string stdvector stdstring uint8t
Performance issue for vector::size() in a loop in C++

In the following code: std::vector<int> var; for (int i = 0; i < var.size(); i++); Is the …

c++ performance vector for-loop stdvector
Is there a standard way of moving a range into a vector?

Consider the following program which inserts a range of elements into a vector: vector<string> v1; vector<…

c++ c++11 insert stdvector