Answers for "cpp pushfront vector"

C++
1

cpp pushfront 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
0

vector push front insert()

    auto it = vec.insert(vec.begin(), 3);
Posted by: Guest on May-23-2021

Browse Popular Code Answers by Language