title: warning: implicit declaration of function is invalid in C99?
body: <p>This is a header file    </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int m = 18;
  int x = 4;
  
  int singles (n) {
      if (n == 1)
           return 0;
      return doubles(n-1);
  } 
  
  int doubles (n) {
      if (n == 1)
          return 0;
  
      return triples(n-1);
  }
  
  int triples (n) {
      if (n == 1)
          return m;
  
      return (singles(n-1) + doubles (n-1) + triples (n-1))*(m-1);
  }
  </code></pre>
  
  <p>and this is the main file</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include "test.h"
  
  int main () {
      printf("%d",singles (x));
  }
  </code></pre>
  
  <p>So this is pretty complicated for me at-least.The idea is that in the main function i will call singles(x) where x =4 so its more like singles (4),it will call doubles (3),that will call triples (2),that will call all of singles(1) which will return 0,doubles (1) that returns 0 and triples (1) that will return m.</p>
  
  <p>So the error i am getting is</p>
  
  <pre><code>./test.h:13:12: warning: implicit declaration of function 'doubles' is invalid
        in C99 [-Wimplicit-function-declaration]
      return doubles(n-1);
         ^
  ./test.h:20:12: warning: implicit declaration of function 'triples' is invalid
        in C99 [-Wimplicit-function-declaration]
      return triples(n-1);
         ^
  2 warnings generated. 
  </code></pre>
  
  <p>I tried to create a header file .h with the first script and then made a second .c  script that i try to compile that won't work.I tried importing the header to try to avoid this error but it doesn't seem to work.
  Thanks a lot</p>