simulation in visual c++

checkerboard's Avatar, Join Date: Feb 2007
Newbie Member
I have a set of functions which includes a random number generator.

I wish to do some simulation, that is to repeat the set of functions several times (hence using a different set of random numbers each time).

How do I go about doing it? I have managed to do 1 simulation, but I need a thousand and I also need to find a way to store the information from each and every simulation.

thank you for the help.
ever_thus's Avatar, Join Date: Jan 2007
Use a for loop to iterate over the functions and store the results in an array.

That might not be clear but I advise you to find out what those words mean if you want to get far in programming.
DaWei's Avatar, Join Date: Dec 2006
Team Leader
Seed the RNG just once, during initialization, or you'll find your 'random' numbers repeating.