Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ how to add something at the start of a vector

#include <vector>

int main() {
    std::vector<int> v{ 1, 2, 3, 4, 5 };
    v.insert(v.begin(), 6);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #start #vector
ADD COMMENT
Topic
Name
8+9 =