title: Newbie random number generator in C question?
body: <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;time.h&gt;
  
  int main(int argc, const char *argv[]) {
      srand(clock());
      int num = rand() % 6 + 1;
  
      printf("%i", num);
      return 0;
  }
  </code></pre>
  
  <p>I get this warning in "srand(clock());" line. </p>
  
  <p>Warning: Implicit conversion loses integer precision: 'clock_t' (aka 'unsigned long') to 'unsigned int'</p>
  
  <p>How do I fix it? Thanks!</p>