title: Random number generator - why seed every time
body: <p>I am relative new to c and c++. In java, the language I am used to program in, its very easy to implement random number generation. Just call the the static random-method from a class called Math.</p>
  
  <pre><code>int face = ((int)(Math.random() * 6) + 1);
  </code></pre>
  
  <p><em>simulates a dice-throw ...</em> </p>
  
  <p>In c and c++ you have to <em>"seed the random number generator"</em> , by calling the srand-function</p>
  
  <pre><code>srand ( time(NULL) );
  </code></pre>
  
  <p>What is the point of doing this - I mean is there any advantage of having to seed the random number generator every time the code is run?</p>