0

Can anyone tell me

Name of the header file needed for using randomize() in solo learn app

26th Mar 2017, 9:05 AM
Gaurav Kaushik
Gaurav Kaushik - avatar
2 Answers
+ 2
You will need to include the following: #include <stdlib.h> #include <ctime> Since the seed for random numbers is set using this: srand(time(NULL)), you'll need the ctime library along with stdlib.h, which includes the srand() and rand() function. There is no function in these libraries called 'randomize()'. Hope this helps
26th Mar 2017, 5:03 PM
Zeke Williams
Zeke Williams - avatar
- 1
there isn't any function named randomize() in standard library there is function called rand() in <stdlib.h>
26th Mar 2017, 9:17 AM
Keshave Jat
Keshave Jat - avatar