Top "Stdvector" questions

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

std::vector resize downward

The C++ standard seems to make no statement regarding side-effects on capacity by either resize(n), with n < size(), …

c++ vector resize std stdvector
std::dynarray vs std::vector

C++14 presents std::dynarray: std::dynarray is a sequence container that encapsulates arrays with a size that is fixed at …

c++ stdvector
Vector of vectors, reserve

Suppose I want to represent a two-dimensional matrix of int as a vector of vectors: std::vector<std::vector&…

c++ stdvector
Vector of const objects giving compile error

I have declared the following in my code vector <const A> mylist; I get the following compile error …

c++ stdvector c++98
Create a fixed size std::vector and write to the elements

In C++ I wish to allocate a fixed-size (but size determined at runtime) std::vector then write to the elements …

c++ arrays constants stdvector dynamic-arrays
Returning an STL vector from a function - copy cost

When you return an stl vector from a function: vector<int> getLargeArray() { ... } Is the return going to be …

c++ stl stdvector
Is it good practice to use std::vector as a simple buffer?

I have an application that is performing some processing on some images. Given that I know the width/height/format …

c++ std stdvector
Vector going out of bounds without giving error

I have a std::vector. I check its size which is 6 but when I try to access vec[6] to check …

c++ stdvector
Pass, return and convert to vectors list of lists over JNI

I need to pass from Java List< List<MyPoint> > points; over jni to C++ and convert …

java c++ list java-native-interface stdvector
Prettier syntax for "pointer to last element", std::vector?

I'm wondering if there is prettier syntax for this to get a normal pointer (not an iterator) to the last …

c++ stl vector stdvector