I'm currently making a spaghetti mess that I call snake game and I ran into a problem. I defineda struct snakeSeg and below a head pointer, now the problem is at the initialisation not at declaring the pointer within itself. Take a look: '''
struct snakeSeg
{
int snakeX;
int snakeY;
snakeSeg *next;
};
snakeSeg *head = new snakeSeg;
head->next = NULL; //<-----Here's the problem that I ran into
head->snakeX = 15;
head->snakeY = 15;
''' If anybody had any idea what's wrong I'd love to read your input. Cheers!