How could I simple initialize a multidimensional C-array with 0 elements like this:
int a[2][2] = { { 0, 0 }, {0, 0} }
This should work:
int a[2][2] = {0};
EDIT This trick may work for silencing the warning:
int a[2][2] = {{0}};
Use memset:
memset(a,0,sizeof a);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With