title: incompatible implicit declaration of built-in function 'printf"
body: <p>I have a big problem.
  This is the header file I created to have a little terminal menu.
  The problem is, in function "menu" (italian name) , that when I compile it I get a warning that says 
  "[Warning] incompatible implicit declaration of built-in function 'printf' [enabled by default]"
  And then if I run it it CRASHES.</p>
  
  <pre><code>#ifndef HEADER
  #define HEADER
  
  int numeroOpz = 0;
  int selezON = 0;
  int tasto;
  
  struct Opzione{
   char *testo;
   int selez;
   };
  
  struct Opzione *opz;
  
  void nuovaOpzione(char *testoOpz){
   strcpy(opz[numeroOpz].testo, testoOpz);   //Il testo dell'opzione viene copiato
   opz[numeroOpz].selez = 0;          //Nessuna opzione viene inizialmente selezionata
   numeroOpz++;
   }
  
  void menu(){
   opz[0].selez = 1;
  
   while(tasto != 13){
   int i;
   for(i=0;i &lt; numeroOpz;i++){
             if(opz[i].selez == 1){
                      printf("||%s||\n", opz[i].testo);
                             }
             else if(opz[i].selez == 0){
                      printf("%s\n", opz[i].testo);
                             }
             tasto = getch();
  
             switch (tasto){
                    case 72:  //SU
                       if(selezON &gt; 0){
                           opz[selezON].selez = 0;
                           opz[selezON-1].selez = 1;
                           selezON--;
                                      }
                       else{
                           opz[selezON].selez = 0;
                           opz[numeroOpz-1].selez = 1;
                       }
                    break;
                    case 80:  //GIU
                       if(selezON &lt; numeroOpz){
                           opz[selezON].selez = 0;
                           opz[selezON+1].selez = 1;
                           selezON++;
                                      }
                       else{
                           opz[selezON].selez = 0;
                           opz[0].selez = 1;
                       }
                    break;
                    default:
                           printf("Error\n\n\n\n");
                    break;
                    }
             }
  
     }
   }
  
  #endif
  </code></pre>
  
  <p>And HERE is the source file:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #include "Opzioni.h"
  
  int main(){
  nuovaOpzione("Ciao");
  nuovaOpzione("Bellaaa");
  nuovaOpzione("Hey");
  
  menu();
  
  getch();
  return 0;
  }
  </code></pre>
  
  <p>I'm just getting crazy, and yes, I searched a lot for help in other questions...
  Thanks for helping if you do! :P</p>
  
  <p>btw: the strcpy function in "nuovaOpzione" is a warning as well, but yolo...</p>