Advertisement
keky

Dynamic matrix allocation

May 28th, 2015
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.13 KB | None | 0 0
  1. int **board;
  2. int rows = 10;
  3. int cols = 7;
  4. board = new int*[rows];
  5.  
  6. for (int i = 0; i < rows; ++i) {
  7.   board[i] = new int[cols];
  8.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement