June 2017
Intermediate to advanced
532 pages
12h 59m
English
We will play with std::ostream_iterator by enabling for combination with a new custom class and have a look into its implicit conversion capabilities, which can help us with printing:
#include <iostream> #include <vector> #include <iterator> #include <unordered_map> #include <algorithm> using namespace std;
string word_num(int i) {
unordered_map<int, string> m { {1, "one"}, {2, "two"}, {3, "three"}, {4, ...Read now
Unlock full access