in c++ I have
vector > table;
How can I resize vector so that it has 3 rows and 4 columns, all zeros?
Someth
You can use resize() from std::vector :
table.resize(4); // resize the columns for (auto &row : table) { row.resize(3); } // resize the rows
Or you can directly initialize it as :
std::vector> table(4,std::vector(3));