how to use /dev/urandom

C++
# read 30 random bytes to random.bytes
head -c 30 /dev/urandom > random.bytes
Source

Also in C++: