title: conflicting types for main and previous definition of main was here when compiling with make
body: <p>I'm trying to compile three files together, having one main method in passweb.c.</p>
  
  <p>heres passweb.c</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;cipher.c&gt;
  #include &lt;menu.c&gt;
  
  long pointer;
  char *createRecord(char *name, char *password, char *type);
  char *file = "password.csv";
  int main(int argc, char *argv[]){
      if(fopen(file,"r")==NULL){
          FILE *newFile = fopen(file,"w+");
          fclose(newFile);
      }
      if(strcmp(argv[0],"-menu")==1){
          menu();
      }
      else if(strcmp(argv[0],"-add")==1){
          add(argv[1], argv[2], argv[3]);
      }
      else if(strcmp(argv[0],"-edit")==1){
          edit(argv[1],argv[2],argv[3],argv[4],argv[5],argv[6]);
      }
  }
  </code></pre>
  
  <p>and cipher.c</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int Encrypt(char *fileName){
      int offset=5;
      Shift(fileName, offset);
  }
  int Decrypt(char *fileName){
      int offset=-5;
      Shift(fileName, offset);
  }
  </code></pre>
  
  <p>the makefile:</p>
  
  <pre><code>passweb: passweb.c menu.c cipher.c
        gcc -o passweb passweb.c menu.c cipher.c -I.
  </code></pre>
  
  <p>the errors:</p>
  
  <pre><code>passweb.c:10: error: conflicting types for ‘main’
  ./cipher.c:3: error: previous definition of ‘main’ was here
  </code></pre>
  
  <p>I can't figure out what I'm doing wrong. 
  Thank you in advance for your time!!</p>