title: Generate double random numbers? C++
body: <p>I'm a first semester comp sci student working on an assignment. The assignment is seemingly asking for double random numbers however the professor has only shown how to find integers from a random number generator using rand and srand. Any tips on this?
  a. Write a function to simulate a single shot. It should use the following declaration:</p>
  <p>void shoot(bool &amp;targetAlive, double accuracy);</p>
  <p>This would simulate someone shooting at targetAlive with the given accuracy by generating a random number between 0 and 1. If the random number is less than accuracy, then the target is hit and targetAlive should be set to false. You need to generate random numbers.</p>
  <p>For example, if Bob is shooting at Charlie, this could be invoked as:</p>
  <p>shoot(charlieAlive, 1.0);</p>
  <p>Here, charlieAlive is a Boolean variable that indicates if Charlie is alive. Test your function using a driver program before moving on to step b.</p>