Skip to main content
2 de 2
adicionou 6 caracteres ao conteúdo
hkotsubo
  • 66,9mil
  • 25
  • 87
  • 170

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