C++ 真随机

//随机数的种子这样
1、
#include <ctime>

2、
srand(  (unsigned int)time(NULL)  );

3、
rand()%(GAME_WIDTH - m_enemys[i].m_Rect.width());
原文地址:https://www.cnblogs.com/yuanjia8888/p/15108746.html