I have 4 arrays that represent:
- Colour (r , g, b, y)
- Shape (A , B , C, D)
- Number (1 , 2 , 3, 4)
- Texture (a, b , c, d)
and also each array can have 4 values. I want to have in an array all the possible combinations of all these elements. For example rA1a, rB1a,rC1a and so on. I am thinking of creating a structure and then somehow create these 256 elements of the structure. However I am totally blind to how I can do this—I mean create the 256 elements! Can someone please point me in the right direction?
The struct I am thinking of is like this, but maybe a structure is not what I need? What I intent to do next is then randomly pick some of these 256 elements, and put the selected ones in a 2d array to manipulate them even further. But first things first!
typedef struct
{
char colour;
char shape;
char nr;
char texture;
}ST1;