I have variable in header:
const static int RED = 0;
const static int BLUE = 1;
const static int GREEN = 5;
const static int DOG = 8;
const static int CAT = 9;
const static int SNAKE = 7;
How can I create a global array and initialize them with the values of these const
variables?
I tried:
const static int color[3] = {BLUE, GREEN, DOG};
const static int animal[3] = {DOG, CAT, SNAKE};
But compiler say error:
initializer element is not constant
(I need to create some structure which I can loop over.)