Jump to content

C++ Language/Std/Stl/CollectionClasses/SequenceCollections/Vector/Construction

From Wikibooks, open books for an open world

There are many ways to construct a vector, such as initializing it from a literal value using brace-syntax: std::vector<int> veciVar = {0, 11, 22, 33};.

Additional information about vector construction (includes interactive examples)