Is there a way to typedef a 2 dimensional array in C? Something like:
typedef char[10][10] board;
This example doesn't compile. Is there any way to do it? Or any other solution?
Try this:
typedef char board[10][10];
Then you can define new array as this:
board double_array = {"hello", "world"};
It's the same with:
char double_array[10][10] = {"hello", "world"};
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