June 2017
Intermediate to advanced
532 pages
12h 59m
English
In this section, we are filling an std::vector instance with some example integers, and then prune some specific items away from it. The way we are doing it is considered the correct way of removing multiple items from a vector.
#include <iostream> #include <vector> #include <algorithm>
using namespace std;
int main() { vector<int> v {1, 2, 3, 2, 5, 2, 6, 2, 4, 8};
const auto new_end (remove(begin(v), ...
Read now
Unlock full access