Is it correct to pass the random number generator mt19937 by reference to helper functions?
<pre><code>int helper( mt19937&amp; generator ){ 

    do stuff; 
    return 0; 

}

#include "helper.h" 
// helper function defined in separate source file and included in header

mt19937 generator(time(NULL));

int main( ) {

    help(generator);

}
</code></pre>

<p>Is it correct to create and seed the mt19937 random number generator, then pass it by reference to a function for use?</p>

<p>I am doing this because I know I am suppose to only seed mt19937 once. But I have a lot of helper functions in separate source files that need to use a random number generator. E.g. with the shuffle function.</p>