I tried to use the following code to generate random numbers but it always show me errors first is that t is not declared in this scope
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <iostream>
#include <cmath>
int main()
{
staticunsignedlong x=123456789, y=362436069, z=521288629;
unsignedlong xorshf96(void) //period 2^96-1
unsignedlong t;
x ^= x << 16;
x ^= x >> 5;
x ^= x << 1;
t = x;
x = y;
y = z;
z = t ^ x ^ y;
return z;
}