C - error: expected identifier or '(' before 'void'
<p>I'm learning C, and was trying to create an ArrayList for practice.  When I try to compile this code, I get quite a few errors, but I can't figure out why I am getting this: </p>

<p>Test.c:12:13: error: expected identifier or '(' before 'void'
 struct init(void);</p>

<p>There wasn't much on google about this error in connection to void, so any help would be greatly appreciated.  Thanks!</p>

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

    struct ArrayList {
    int size;
    int typeSize;
    int index;
    int array[];
};

struct init(void);

void add(struct list, int x);

int get(struct list, int x);


int main() {
   struct ArrayList list = init();
   add(list, 4);
   printf("%d", get(list, 0));
   return 0;
}


struct init(void) {
    ArrayList this;
    this.size = 0;
    this.index = 0;
    return this;
}

void add(struct list, int x) {
    list-&gt;array[size] = x;
    size++;
}

int get(struct list, int index) {
    return list-&gt;array[index];
}
</code></pre>