title: UNIX - syntax error in my main
body: <p>Im getting a syntax error in the following main statement...</p>
  
  <pre><code>int main (int argc, char *argv[]) {
  </code></pre>
  
  <p>The error says "syntax error near unexpected token `('".</p>
  
  <p>However, as you can see, there are the right amount of parentheses there. What's the issue?</p>
  
  <p>Thanks!</p>
  
  <p>More code:</p>
  
  <pre><code>/*Core Dump Program*/
  
  #include &lt;stdio.h&gt;
  #include &lt;sys/resource.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;errno.h&gt;
  
  
  int main (int argc, char *argv[])
   {
    struct rlimit limit;
  
    limit.rlim_cur = 0;
    limit.rlim_max = 0;
    if (setrlimit(RLIMIT_CORE, &amp;limit) == -1){
      printf("Error preventing core dump errno=%d\n", errno);
      exit(10);
    }
    else {
      printf("The current core limit is %llu\n", limit.rlim_cur);
      printf("The core max limit is %llu\n", limit.rlim_max);
      exit(0);
    }
    if (getrlimit(RLIMIT_FSIZE, &amp;limit) == -1){
      printf("getlimit() failed with errno=%d\n", errno);
      exit(1);
    }
    else {
      printf("The current core limit is %llu\n", limit.rlim_cur);
      printf("The core max limit is %llu\n", limit.rlim_max);
      exit(0);
  
    }
    if (getrlimit(RLIMIT_CPU, &amp;limit) == -1){
      exit(1);
    }
    else {
      printf("The current core limit is %llu\n", limit.rlim_cur);
      printf("The core max limit is %llu\n", limit.rlim_max);
      exit(0);
    }
  
    if (getrlimit(RLIMIT_NOFILE, &amp;limit) == -1){
        printf("Error preventing core dump errno=%d\n", errno);
        exit(1);
      }
    else {
        printf("The current core limit is %llu\n", limit.rlim_cur);
        printf("The core max limit is %llu\n", limit.rlim_max);
        exit(0);
    }
  
    if (getrlimit(RLIMIT_NPROC, &amp;limit) == -1){
      printf("Error preventing core dump errno=%d\n", errno);
      exit(1);
    }
    else {
      printf("The current core limit is %llu\n", limit.rlim_cur);
      printf("The core max limit is %llu\n", limit.rlim_max);
      exit(0);
  
    }
    }
  </code></pre>