Flashcards
Vectors
Cards in this deck (3)
- 1How to copy a vector in C++?Method 1 : Iterative method.
Method 2 : By assignment “=” operator.
Method 3 : By passing vector as constructor.
Method 4 : By using inbuilt functions "copy" and "assign". - 2Syntax of copy function in Vectors?copy(first_iterator_o, last_iterator_o, back_inserter());
eg: copy(vect1.begin(), vect1.end(), back_inserter(vect2)); - 3Syntax assign function in vectors c++?assign(first_iterator_o, last_iterator_o)
Information
- Description
- Computer Science Flashcards on Vectors, created by Vivek Kumar on 28/06/2018.
- Created by
- Vivek Kumar
- Views
- 2
- Tags
- Rating