I have a program which generates random cards from deck but when I run it, it says the same every time!
How can this be?
This is a discussion on Random numbers the same every time! within the C++ Programming forums, part of the General Programming Boards category; I have a program which generates random cards from deck but when I run it, it says the same every ...
I have a program which generates random cards from deck but when I run it, it says the same every time!
How can this be?
Perhaps you did not seed the random number generator
Look up srand(..)