Hi,
My problem is relatively simple, but I am pretty confused as to how to implement a solution...
My project will be using random numbers across various classes. I currently have a class which creates some pretty sweet randoms. What I want to do is be able to access a call to the random number generator anywhere in my program - within any class that might need it.
On another board people suggested using a namespace - which i will freely admit is not something I totally understand. I get the basic concept, but I don't see quite how implement.
Currently I have the following files:
main.cpp
yardage.h (this is for a football game - these are yardage results)
yardage.cpp
mersenne.h (rng header)
mersenne.cpp (rng implement)
untilites.h (this is where the namespace would live)
I will be generating randoms in both Main and yardage (among others)
The thing is, the mersenne class is pretty complex and I'm not sure how to approach implementing this.
Any suggestions? Please remember - I'm (apparently) pretty noobish here, so as much patience as you can muster would be appreciated.