title: Warning 1 warning C4244: 'argument' : conversion from 'time_t' to 'unsigned int', possible loss of data plus other errors
body: <pre><code>// Write a random number generator that returns a random folating point number between 0.0 and 1.0.
  
  #include "stdafx.h"
  #include &lt;iostream&gt;
  #include &lt;cmath&gt;
  #include &lt;cstdlib&gt;
  using namespace std;
  
  int rand_float(int n);
  
  int main()
  
  {
  
  int n, i;
  double r;
  
  srand(time(NULL));
  
  cout &lt;&lt; "Enter number of dice to roll: ";
  cin &gt;&gt; n;
  
  for (i - 1; i &lt;= n; i++) {
  r = rand_float();
  cout &lt;&lt; r &lt;&lt; endl;
  
  }
  return 0;
  
  }
  
  // Random Float Function
  // 
  double rand_float() {
  
  return (double) rand () / RAND_MAX;
  
  }
  </code></pre>
  
  <p>Now the problems / Errors  are </p>
  
  <p>Warning 1   warning C4244: 'argument' : conversion from 'time_t' to 'unsigned int', possible loss of data</p>
  
  <p>Warning 2   warning C4552: '-' : operator has no effect; expected operator with side-effect </p>
  
  <p>Error   3   error C2660: 'rand_float' : function does not take 0 arguments  </p>