1 // 随机生成数 2 srand(time(0));// 设置随机种子 3 int _bgImageNumber = rand() % 5;//设置随机数 转载于:https://www.cnblogs.com/dudu580231/p/4570883.html