Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

initialize all elements of vector to 0 c++

 vector<int> vect1(10); //number of elements in vector
    int value = 0;
    fill(vect1.begin(), vect1.end(), value);
 
PREVIOUS NEXT
Tagged: #initialize #elements #vector
ADD COMMENT
Topic
Name
1+8 =