I draw random numbers using &lt;random&gt; from C++11. I do it by creating an instance obj of the following class (for the interested reader: It is taken from this thread):

class RNG
{
public:
    typedef std::mt19937 Engine;
    typedef std::uniform_real_distribution&lt;double&gt; Distribution;


    double operator()()
    {
        return distribution(engine);
    }
    Engine engine;
    Distribution distribution;
};


Calling obj() gives me the desired random number. Now, I have three functions that all have to use obj. Declaring obj global would work, but is it also correct? Or are there other (more correct) alternatives?


Question: iTunes reject app for date of birth
Answer: Now, I am able to make app live on App store.
I remove DATE OF BIRTH field and add AGE field where user just select age, not birthdate.

And then, Apple make it live.