#include <iostream>
#include <vector>
int main()
{
    std::vector< std::vector<int> > array =
    {{1, 0, 0, 1},
     {1, 0, 1},
     {2, 1},
     {1, 3, 4}};

    // can add rows whenever
    std::vector<int> row = {1,2,3,4,5};
    array.push_back(row);

    // can resize existing rows, too
    array[0].resize(6);

    // print:
    for(auto& row: array) {
        for(int n: row)
            std::cout << n << ' ';
        std::cout << '\n';
    }
}
