August 2017
Intermediate to advanced
438 pages
14h 19m
English
We can rewrite the function like this:
#include <boost/array.hpp>typedef boost::array<char, 4> array4_t;array4_t& vector_advance(array4_t& val);
Here, boost::array<char, 4> is just a simple wrapper around an array of four char elements.
This code answers all the questions from our first example and is much more readable than the code from the second example.
Read now
Unlock full access