title: time.h works in C++ not in C
body: <p>The code:</p>
  
  <pre><code>#include "stdafx.h"
  #include "stdio.h"
  #include "math.h"
  #include "stdlib.h"
  #include "time.h"
  int main()
  {
      time_t start, end;
      time (&amp;start);
      int i;
      double dif;
      /*int serie[100000];*/
      /* int *serie = malloc( sizeof(int) );
  
      for (i = 0; i &lt;= 100000; i++) {
          *serie(i)=rand();
          printf("%d \n", serie[i]);
      }
      */
      time (&amp;end);
      dif = difftime (end, start);
  
      printf ("Time of execution is: %f\n", dif );
  
      getchar();
  
      return 0;
  
  }
  </code></pre>
  
  <p>The Introduction: (no need to read it)</p>
  
  <p>I knew a bit of C++ from about 3 years ago. I have decided
  to learn C to create a "fast" subset sum algorithm.  This was a
  simple program to learn C.  The problem is to create random numbers and
  time it.  This code actually works when I compiled as default or
  C++ with Visual Studio, but I decided to do it in C
  and I wanted to create a dynamic array.</p>
  
  <p>It seems that there is no <code>new</code> in C.  We have to use <code>malloc</code>,
  but to compile <code>malloc</code> I think it has to be compiled in C.  In C++,
  it gives me this error:</p>
  
  <pre><code>cannot convert from 'void *' to 'int *'
  </code></pre>
  
  <p>Anyway, it happens that I decided to write in C, so it seems logical to
  compile in C.  I have chosen the <code>time</code> function to measure the program,
  I like it more than <code>clock</code> because I do not know how many processors
  are working.</p>
  
  <p>The question:</p>
  
  <p>The code as it is above with the comments compiles perfectly in C++, but in C it doesn't compile.
  Specifically, this line:</p>
  
  <pre><code>time (&amp;start);
  </code></pre>
  
  <p>gives me this error:</p>
  
  <pre><code>syntax error : missing ';' before 'type'
  </code></pre>
  
  <p>I just want to compute the start time and the end time and then
  subtract them with <code>difftime</code> as I have successfully done in C++.</p>