title: warning: incompatible implicit declaration of built-in function 'strlen' and 'strcpy'
body: <p>I just finnished my hangman game and as a last step I am doing some code cleanup and optimization, but I can't seem to understand why I receive the following two warnings:</p>
  
  <p>warning: incompatible implicit declaration of built-in function 'strlen'</p>
  
  <p>warning: incompatible implicit declaration of built-in function 'strcpy'</p>
  
  <p>The code in which they are used is here:</p>
  
  <pre><code>for(i = 1; i &lt;= random; i++)
      fgets(word, 100, f);
  fclose(f);
  
  for(i = 0; i &lt; strlen(word); i++)
      if(word[i] == '\n')
          word[strlen(word)-1] = '\0';
  
  lungime = strlen(word);
  strcpy(word2, word);
  </code></pre>
  
  <p>What I done was to read a random word from a file, using fgets. After this, I removed the '\n' which fgets automatically puts. Finally, I made a copy of the word in word2.</p>
  
  <p>Used libraries:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;stdlib.h&gt;
  #include&lt;time.h&gt;
  </code></pre>
  
  <p>Declaration of variables:</p>
  
  <pre><code>int random, n = 0, i, j, lengh, tries = 5, ok = 0, error = 0;;
  char word[100], word2[100], tried_letters[50], auxch;
  </code></pre>
  
  <p>Note: everything works perfect in my program, but I receive those two warnings which I would like to get rid of.</p>
  
  <p>Thanks in advance.</p>