These array declarations both cause compiler errors:
byte foo [][6] = { { '0', '0','0','0','0','1' },{ '0', '0','0','0','0','2' } };
byte bar [] [6] = { "000001", "000002" };
Errors:
Severity Code Description File Line
Error 44:85: error: too many initializers for 'byte [0][6] {aka unsigned char [0][6]} D:\Documents\Arduino\libraries\NanoBots\src\BJDriverRF24.h 44
Error 46:48: error: too many initializers for 'byte [0][6] {aka unsigned char [0][6]} D:\Documents\Arduino\libraries\NanoBots\src\BJDriverRF24.h 46
I have also tried this (one less byte in inner array):
byte array[][6] = { { '0','0','0','0','1' },{ '0','0','0','0','2' } };
But I get the same error.
Even this causes the same error:
int foo [] [6] = { {0,0,0,0,0,1},{0,0,0,0,0,2} };
int bar [] [6] = { {0,0,0,0,1},{0,0,0,0,2} };
What is the correct way to declare and initialized these arrays?