title: 'declared as a function' in C
body: <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  #define LIMIT 100
  
  /* Stack structure */
  typedef struct stack
  {
    char x[LIMIT][10];
    int top;
    void push(char *s);
    char *pop();
    void init();
    bool is_empty();
  } stack;
  
  
  /* Reset stack's top */
  void stack init()
  {
    this-&gt;top = 0;
  }
  </code></pre>
  
  <p>And codes go on but It gives that error:</p>
  
  <pre><code>main.c|14|error: field 'init' declared as a function|
  </code></pre>
  
  <p>What is wrong? I can not figure out it since yesterday. Please help me.</p>