title: C++ random numbers
body: <p>How can I use random numbers in Linux and C++?</p>
  
  <p>I have found some code I would like to use, it has the line</p>
  
  <pre><code>srand((unsigned)time(0));//seed
  </code></pre>
  
  <p>but gcc says</p>
  
  <blockquote>
    <p>board.cpp:94:24: error: ‘time’ was not declared in this scope</p>
  </blockquote>
  
  <p>I have included the following files</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  #include &lt;vector&gt;
  #include &lt;algorithm&gt;
  </code></pre>