title: Converting time_t to an int
body: <p>I want to convert the unix timestamp returned by time() as time_t to an integer. I've been searching for a solution for 20 minutes, and decided to ask here.</p>
  
  <p>Every solution I have found has not worked. When trying to cast from time_t to int, I get errors:</p>
  
  <pre><code>long int t = static_cast&lt;long int&gt; time(NULL);
  </code></pre>
  
  <blockquote>
    <p>error C2061: syntax error : identifier 'time'</p>
    
    <p>error C2146: syntax error : missing '(' before identifier 'time'</p>
  </blockquote>
  
  <p>I am very very new to C++. Thanks in advance.</p>