In the srand manual man srand
it says that srand has a unsigned int
as its parameter, however when using it without cast the compiler does not complain. Is it possible to go wrong if you do not use cast (unsigned int)
? If yes, what are the possible errors?
An example, comparing the two lines of code below:
srand(time(NULL));
srand((unsigned int)time(NULL));