C++ Simple Dice roll - how to return multiple different random numbers [duplicate]
问题 This question already has answers here : How does calling srand more than once affect the quality of randomness? (5 answers) Closed 2 years ago . I am pretty new to C++ and am trying to make a simple die roll with a Die class/main. I can get a random number within my range 1-dieSize, however, each time I "roll the dice" it just gives me the same random number. For example, when I roll this dice three times, it will cout 111 or 222 etc instead of 3 different random rolls. Any help explaining