I have a question about het the c++ random class. I have a program which has multiple class objects, each calls the rand() function from the c++ library. Does every object has its own sequence of random numbers or do they all descend from the same rand() class object? If the sequence is shared, is there a way to give each objects it's own sequence of random numbers?
Greetings,T
No.
If you need something like that, you'll have to either implement you own generator or use one from a third party. rand() can only be initialized or advanced.
When simulating stochastic processes it is preferred to assign unique random sequences to parts of the simulation. With this e.g. it is possible to recreate parts of the simulation in exactly the same way, because of the same seed for that part, and then when modifying other parts of the simulating you can study differences cause by the changed part.