Expected Declaration Specifiers or ‘...’ before ‘&’ token
<p>I'm a beginner in C, i just have 13 years, so i'm pretty sure that the error is something very basic.</p>

<p>I was bored in school, i started writing C about a "Game".</p>

<p>Here is it:</p>

<pre><code>#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

typedef struct {
    int * id;
    int * posx;
    int * posy;
    char * name;
} entity;

int allocData(&amp;entity) {
    entity-&gt;id = malloc(sizeof(int));
    if(entity-&gt;id == NULL) {
        return 1;
    }
    entity-&gt;posx = malloc(sizeof(int));
    if(entity-&gt;posx == NULL) {
        return ;
    }
    entity-&gt;posy = malloc(sizeof(int));
    if(entity-&gt;posy = NULL) {
        return 1;
    }
    entity-&gt;name = malloc(sizeof(char) * 129);
    if(entity-&gt;name == NULL) {
        return 1;
    }
    return 0;
}

int main() {
    entity player;
    allocData(&amp;player);
    player.id = 0;
    player.name = "loopback\0";
    printf("ID: %d, Name: %s", player.id, player.name);
    return 0;
}
</code></pre>

<p>But GCC complains.</p>

<pre><code>main.c:11:15: error: expected declaration specifiers or ‘...’ before ‘&amp;’ token
 int allocData(&amp;entity) {
               ^
</code></pre>

<p>I can't find the error, and i didn't want to post here, i'm sure is something stupid that i missed.</p>