array of 0's and 1's int vs char

1
2
3
4
5
6
7
8
char arr[5][5] // actually im going to have hundreds of indexes
{
   {'0','0','0','0'},
   {'0','1','1','0'},
   {'0','1','1','0'},
   {'0','0','0','0'}
};

1
2
3
4
5
6
7
int arr[5][5] // actually im going to have hundreds of indexes
{
   {0,0,0,0},
   {0,1,1,0},
   {0,1,1,0},
   {0,0,0,0}
};


what will be the best one to use here?

thanks
What values do you actually need? If it is just two distinct values, a boolean would suffice.

Does the "hundreds of indexes" mean, for example char arr[783][695]?

Is the size of the array static (known at compile-time), or dynamically determined during runtime?
@keskiverto

im writing tetris game.
im not done writing the array but i can say that its going to be 4D static array.


does the "hundreds of indexes
nope, i mean like arr[7][7][7][7] and it is 2401 index

and actually it will compose of 3 distinct values.
Last edited on
closed account (49iURXSz)
Cool, a Tetris Game!

Now that that's out of the way, may I ask what each of the values corresponds to in your multidimensional array?
Topic archived. No new replies allowed.