0
Why we need such a function rand(); which give us random numbers ?
means in which situation it is useful
4 Réponses
+ 1
In case you want to generate random password for user, for example.
0
but we get same numbers when run again so always it gives same password for others too is this correct or not
0
yea i understand for changing passwords we use seed values by srand(); function 👍
0
Then you have to use some other random generating library, because rand works badly. Look http://en.cppreference.com/w/cpp/numeric/random
And still if you want a random password, you have to use some random number generator.