Normally, I use the following lines to generate pseudo-random numbers in C++ code:
srand(time(0));
int x = rand() % 100; // 0 ~ 99
But since Intel has implemented random generator hardware in their new processors, I want to take advantage of the true 'randomness' from thermal fluctuations. I have searched Intel C++ compiler documents but didn't find a definitive guide on the RdRand API.
I looked at this post: True random numbers with C++11 and RDRAND
But it didn't show explicitly how to call this function in C++.
So my question is what compiler or library supports RdRand now and what's the C++ code template to call it.