This tutorial shows how to make a random number generator. srand and rand will be used within this tutorial. srand is seed random and must be used outside of this tutorial’s loop. srand works with the time function. The time function need ctime to be included in the code. A set of random numbers can be made by using the mod ( %) and adding or subtracting from the rand function’s number.
This tutorial uses Visual C++ 2010 Express Running On W7 SP 1