Just copy-paste might save you some time. rand_s is pretty safe on Windows since it uses RtlGenRandom(), but you’ll have to define _CRT_RAND_S first before <stdlib.h> Assuming that the cpp somewhere in the class has: m_fd = open("/dev/urandom", Read More...