Vectors are a kind of sequence container. As such, their elements are ordered following a strict linear sequence.View more random threads:
- Passing 2d array by reference June 2011
- What is generalization in c++ 2011
- constructor and destructor in c++ 2011
- omain knowledge and domain experts in c++ 2011
- Consitional Operator in C++ July 2011
- For running C++ program from command prompt “gcc” and “g++”...
- C++ latest Books 2011
- Is it possible to make data type array which act as java...
- comkplie karta hn to wo save hony k liye location deta hy...
- In file included from...
Vector containers are implemented as dynamic arrays; Just as regular arrays, vector containers have their elements stored in contiguous storage locations, which means that their elements can be accessed not only using iterators but also using offsets on regular pointers to elements.
But unlike regular arrays, storage in vectors is handled automatically, allowing it to be expanded and contracted as needed.
Sponsored Links
Vectors are good at:
* Accessing individual elements by their position index (constant time).
* Iterating over the elements in any order (linear time).
* Add and remove elements from its end (constant amortized time).
There are currently 1 users browsing this thread. (0 members and 1 guests)