Skip to main content
1 de 2
manuel
  • 71
  • 2
  • 9

Como colocar sucessivas matrizes em vector

Tenho as seguintes matrizes de 100 elementos:
int [][]matriz1 = {       {0,0,0,0,0,0,0,0,0,0},
                          {0,0,0,0,0,0,0,0,0,0},
                          {0,0,0,0,0,0,0,0,0,0},
                          {0,0,0,0,0,0,0,0,0,0},
                          {0,0,0,0,0,0,0,0,0,0},
                          {0,0,0,0,0,0,0,0,0,0},
                          {0,0,0,0,0,0,1,0,0,0},
                          {0,0,0,0,0,0,1,0,0,0},
                          {0,0,0,0,1,1,1,0,0,0},
                          {0,0,0,0,1,0,0,0,0,0}};


int [][]matriz2 = {       {0,0,0,0,0,0,0,0,0,0},
                          {0,0,0,0,0,0,0,0,0,0},
                          {0,0,0,0,0,0,0,0,0,0},
                          {0,0,0,0,1,0,0,0,0,0},
                          {0,0,0,1,1,1,0,0,0,0},
                          {0,0,0,0,1,0,0,0,0,0},
                          {0,0,0,0,0,0,0,0,0,0},
                          {0,0,0,0,0,0,0,0,0,0},
                          {0,0,0,0,0,0,0,0,0,0},
                          {0,0,0,0,0,0,0,0,0,0}};

Como passo a matriz1 e matriz2 para um vector? Na posição 0 do vector fica a matriz1 e na posição 1 fica a matriz2.

manuel
  • 71
  • 2
  • 9