mercredi 24 mai 2017

Using `rdtsc`: error C2065

I'm trying to generate random numbers but with this seed

int rdtsc()         
{
    __asm__ __volatile__("rdtsc");
}

But when I try to compile I get this error:

error C2065: '__asm__' : identificador no declarado
error C2146: error de sintaxis : falta ';' delante del identificador '__volatile__'

What do I have to do? Is there another way to generate true random numbers, rather than via time(null)?




Aucun commentaire:

Enregistrer un commentaire