1
I have the following matrices of 100 elements:
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}};
As I step to matriz1
and matriz2
to a vector? At vector position 0 is the matriz1
and at position 1 is matriz2
.
I just wonder if this is really necessary, since it has better and simpler resources to deal with collections. This question looks like a XY problem
– user28595
I need to create pre-defined boards.But to choose 1 random I have to use a Rand function for those who are inserted and return a board
– manuel
And just because you need to create trays, you think you need to use it there? There are easier ways to represent this, but to do so, you’d need to explain better what you’re doing and show what you’ve done with a code that is [mcve]. Perhaps it is a case of another question.
– user28595