Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mat = std::vector<std::vector<int>>(rows);
- for (auto v = mat.begin(); v < mat.end(); ++v) {
- (*v).resize(cols);
- for (auto i = (*v).begin(); i < (*v).end(); ++i) {
- *i = rand() % range;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement