0

Change number in srand(time(0))

Why it shows error when zero in time changed ?

25th Feb 2019, 4:09 PM
Furkan Tashkyn
Furkan Tashkyn - avatar
1 Resposta
+ 2
The declaration of time is: time_t time (time_t* timer); As you see it expects a pointer as argument. 0 can be implicitly converted to a pointer whereas any other number cannot, hence the error.
25th Feb 2019, 5:37 PM
Dennis
Dennis - avatar