I decided to make my own simple game. For "procedural texture drawing" I wanted to create color matrices and fill them, tried to do it directly:
struct blockColor{ int r; int g; int b; blockColor() { r = 0; g = 0; b = 0; }; }; blockColor brickColorMap[8][8]; brickColorMap[8][8].r = { {54, 54, 54, 54, 64, 54, 54, 54}, {54, 54, 54, 54, 64, 54, 54, 54}, {64, 64, 64, 64, 64, 64, 64, 64}, {54, 64, 54, 54, 54, 54, 64, 54}, {54, 64, 54, 54, 54, 54, 64, 54}, {64, 64, 64, 64, 64, 64, 64, 64}, {54, 54, 54, 64, 54, 54, 54, 54}, {54, 54, 54, 64, 54, 54, 54, 54} }; The compiler, of course, gives an error. How would it be correct to fill in such a matrix of fields?