[Solved] C++ random function return same numbers [duplicate]
Your forgot to ad #include <ctime> srand(time(NULL)) at the start of your program. This will generate a new seed everytime you run your program based on the current time. 1 solved C++ random function return same numbers [duplicate]