Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- using namespace std;
- class Matrix
- {
- private:
- std::vector<std::vector<int>> matrix;
- public:
- void setMatrix(int r, int c, int v = 1)
- {
- for (int i = 0; i < c; i++)
- {
- matrix.push_back(new std::vector<int>());
- for (int j = 0; j < r; j++)
- {
- matrix[i].push_back(v);
- }
- }
- }
- }
- int main()
- {
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement