I am attempting to initialize a 2D std::array using arrays in C++:
const array<bool, 7> LEDZERO = { 1,1,1,0,1,1,1 };
const array<bool, 7> LEDONE[] = { 0,0,1,0,0,1,0 };
const array<bool, 7> LEDTWO[] = { 1,0,1,1,1,0,1 };
const array<bool, 7> LEDTHREE[] = { 1,0,1,1,0,1,1 };
const array<bool, 7> LEDFOUR[] = { 0,1,1,1,0,1,0 };
const array<bool, 7> LEDFIVE[] = { 1,1,0,1,0,1,1 };
const array<bool, 7> LEDSIX[] = { 1,1,0,1,1,1,1 };
const array<bool, 7> LEDSEVEN[] = { 1,0,1,0,0,1,0 };
const array<bool, 7> LEDEIGHT[] = { 1,1,1,1,1,1,1 };
const array<bool, 7> LEDNINE[] = { 1,1,1,1,0,1,0 };
const array<array<bool, 7>, 10> LEDS = { { {LEDZERO}, {LEDONE}, {LEDTWO},
{LEDTHREE}, {LEDFOUR}, {LEDFIVE}, {LEDSIX}, {LEDSEVEN}, {LEDEIGHT},
{LEDNINE} } };
Only the first LEDZERO seems to be set to LEDS[0] correctly, LEDS[1-9] are wrong.
const array<bool, 7> LEDONE[] = { 0,0,1,0,0,1,0 };-- See anything wrong with using[]? The strange thing is that you didn't make the mistake withLEDZERO.