Could someone please help me understand the following line of code:
char buttonlabels[15][5] = {"Send", "Clr", "End", "1", "2", "3", "4", "5", "6", "7", "8", "9", "*", "0", "#" };
As you can see the Array is defined as having two dimensions and is initialized with values.
I do not understand why it needs the second dimension?
All initialized values, in my understanding, are initialized as in a single dimension array.
However, if I remove the second dimension declaration( ie: char buttonlabels[15] ) the compiler simply says that there is not enough room in the array to hold the values stated.
Even if I simply use that line of code in a test sketch using a for loop to step through it, it still needs to be declared as two dimensional. I have read through all the Reference material and more regarding declaring arrays and for the life of me I cannot see what is going on here.
This line of code is in an example sketch called phonecal.ino for display on a TFT LCD Touchscreen of a phone keyboard for FONA.
What do I not understand here?
Any help would be much appreciated.
Thanks