title: implicit declaration of function 'GetInt' is invalid in C99
body: <p>I am trying to make this simple code for practice in C. It asks the user to give a positive number, checks if it's positive or not, then returns just positive numbers.</p>
  
  <p>I am getting this error:</p>
  
  <pre><code>positive.c:28:7: warning: implicit declaration of function 'GetInt' is invalid
    in C99 [-Wimplicit-function-declaration]
              n = GetInt();
  </code></pre>
  
  <p>I would have thought this meant I didn't declare one of my functions or that I didn't call in some library. To the best of my knowledge, I did all of this. Here is my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int GetPositiveInt(void);
  
  int main(void)
  {
      int n = GetPositiveInt();
      printf("Thanks for the %i\n", n);
  }
  
  
  /*This all gets called into the above bit*/
  int GetPositiveInt(void)
  {
      int n; /*declare the variable*/
      do
      {
          printf("Give me a positive integer: ");
          n = GetInt();
      }
      while (n &lt;= 0);
      return n; /*return variable to above*/
  }
  </code></pre>
  
  <p><strong>Does anyone have any ideas on why this is giving me an error?</strong></p>