Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite0
rand() is giving same output?
If rand() function gives random no. than why its giving output 41 everytime i execute the code.
2 Réponses
+ 9
Because most likely you forgot to seed your random number generator.
srand( (size_t) time(0) );
0
thankyou guys 👍