Top "Stdvector" questions

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

Is there a more efficient way to set a std::vector from a stream?

Presently, I set the value of a std::vector<char> from an std::ostringstream as follows: void foo(…

c++ stl stdvector stringstream ostringstream
How to properly static cast a vector in C++?

I have a code in which at the end of a function I need to cast from int to double …

c++ stdvector stdarray
`std::vector` throws a "bad allocation" exception when resized

I have the following code in a C++ dll, which I invoke through JNI: std::vector<double> myVector; …

c++ java-native-interface stdvector bad-alloc
Removing objects from C++ containers without deleting them

I am using C++ std vector to store render objects for a simple scene graph implementation.I need an ability …

c++ stdvector 3d-engine
Does std::vector use the assignment operator of its value type to push_back elements?

If so, why? Why doesn't it use the copy constructor of the value type? I get the following error: /usr/…

c++ g++ std stdvector dynamic-arrays
How to "watch" the size of a C++ std::vector in gdb?

I have a std::vector as part of a class, that contains a custom type. Its contents seems to be …

c++ gdb stdvector
Why does reallocating a vector copy instead of moving the elements?

Possible Duplicate: How to enforce move semantics when a vector grows? insert, push_back and emplace(_back) can cause a …

c++ c++11 stdvector move-semantics
Amortized analysis of std::vector insertion

How do we do the analysis of insertion at the back (push_back) in a std::vector? It's amortized time …

c++ algorithm stl stdvector amortized-analysis
vector vs map performance confusion

edit: I am specifically comparing std::vector's linear search operations to the std::map binary search operations because that is …

c++ stdvector