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

C++
1

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);
}
Posted by: Guest on June-19-2020

Code answers related to "c++ how to add something at the start of a vector"

Browse Popular Code Answers by Language