Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   simulation in visual c++ (http://www.go4expert.com/forums/simulation-visual-cpp-t3056/)

checkerboard 18Feb2007 22:36

simulation in visual c++
 
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 20Feb2007 00:47

Re: simulation in visual c++
 
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 20Feb2007 02:57

Re: simulation in visual c++
 
Seed the RNG just once, during initialization, or you'll find your 'random' numbers repeating.


All times are GMT +5.5. The time now is 09:13.