random() doesn't exist on Win32. Just use rand()