I understand that time(0) is commonly using for seeding random number generators and that it only becomes a problem when the program is being run more than once per second. I'm wondering what are some better seeds to consider when generating random numbers. I read about GetTickCount, timeGetTime, and QueryPerformanceCounter on Windows. Will these suffice for almost all operations or are there even better seeding options?
Here is a quick code example using the boost library:
#include <iostream>
#include <boost/random.hpp>
using namespace std;
using namespace boost;
int main()
{
mt19937 randGen(42);
uniform_int<> range(0,100);
variate_generator<mt19937&, uniform_int<> > GetRand(randGen, range);
for (int i = 0; i < 30; ++i)
cout << GetRand() << endl;
}