Trying to make a random using c ++ 11. I do this:

random_device rd; mt19937 gen(rd()); uniform_int_distribution <> dis(1, 274876858367); __int64 s=dis(gen); 

It gives an error on the line: uniform_int_distribution . Mistake:

invalid max and max arguments for uniform_int

    1 answer 1

    Well still ... You set to it the parameter which is obviously falling out for limits int ...

    Try this:

     uniform_int_distribution <unsigned long long> dis(1, 274876858367ull);