Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ vector initialization

vector<int> a;                                       // empty vector of ints
vector<int> b (5, 10);                                // five ints with value 10
vector<int> c (b.begin(),b.end());                     // iterating through second
vector<int> d (c);                                   // copy of c
Source by www.hackerearth.com #
 
PREVIOUS NEXT
Tagged: #vector #initialization
ADD COMMENT
Topic
Name
4+3 =