#include <iostream> #include <vector> template <class T> using Matrix = std::vector<std::vector<T>>; int main() { Matrix<double> m{{1, 2, 3}, {1, 4, 9}, {1, 8, 27}}; for (auto const& line : m) { for (auto x : line) std::cout << x << ' '; std::cout << '\n'; } }