Use of qsrand, random method that is not random

后端 未结 7 2604
误落风尘
误落风尘 2021-02-19 00:12

I\'m having a strange problem here, and I can\'t manage to find a good explanation to it, so I thought of asking you guys :

Consider the following method :



        
7条回答
  •  抹茶落季
    2021-02-19 00:27

    I've found the same action and solved it by using rand() instead the srand().

    But I use it for checking my application. It just working in the cicle, so I don't need to look for it updates.

    But if you going to do some king of game, it isn't a good way, because your randomizing will be the same.

提交回复
热议问题