June 2017
Intermediate to advanced
532 pages
12h 59m
English
We will transform a vector's content by removing items in different ways:
#include <iostream> #include <vector> #include <algorithm> #include <iterator> using namespace std;
void print(const vector<int> &v) { copy(begin(v), end(v), ostream_iterator<int>{cout, ", "}); cout << '\n'; }
int main() { vector<int> v {1, 2, 3, 4, 5, 6}; print(v);
Read now
Unlock full access