warning C4244: 'argument' : conversion from 'time_t' to 'unsigned int', possible loss of data — C++

前端 未结 4 1916
栀梦
栀梦 2020-12-13 19:36

I made a simple program that allows the user to pick a number of dice then guess the outcome... I posted this code before but with the wrong question so it was deleted... no

4条回答
  •  猫巷女王i
    2020-12-13 19:54

    time() returns a time_t, which can be 32 or 64 bits. srand() takes an unsigned int, which is 32 bits. To be fair, you probably won't care since it's only being used as a seed for randomization.

提交回复
热议问题