I am making a basic game and to make things easier I have used:
struct entity {
int health;
int damage;
SDL_Rect hitbox;
} player, basicEnemy[10];
But when I call:
player.hitbox.x = 5;
or something similiar, I get the error:
'player' does not name a type
How do I fix this?