Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Matrix of Numbers - Printing Numbers From a Matrix

In this section we will discuss the possibilities of Spirit.Karma when it comes to generating output from more complex - but still regular - data structures. For simplicity we will use a std::vector<std::vector<int> > as a poor man's matrix representation. But even if the data structure seems to be very simple, the presented principles are applicable to more complex, or custom data structures as well. The full source code of the example discussed in this section can be found here: num_matrix.cpp.


PrevUpHomeNext