I declare this as a global
SDL_Rect playerDown[2];
then I set the variables like
playerDown[0].x = 6;
playerDown[0].y = 1;
playerDown[0].w = 17;
playerDown[0].h = 26;
playerDown[1].x = 41;
playerDown[1].y = 1;
playerDown[1].w = 17;
playerDown[1].h = 26;
playerDown[2].x = 76;
playerDown[2].y = 1;
playerDown[2].w = 17;
playerDown[2].h = 26;
but it doesn't set playerDown[2], but the compiler doesn't complain that I'm trying to set it?
If I make SDL_Rect playerDown[2], SDL_Rect playerDown[3] playerDown[2] then works but playerDown[3] doesn't, can anyone explain this please?