+ 1
Is #include <ctime> necessary?
I've done some programs that use rand(), but I've never included ctime library. Do I need to include that? I usually do include iostream and cstdlib and use: rand(time(NULL)) Can anyone explain me that please? Tanks!
2 ответов
+ 2
To use time() you need to include the time header.
+ 1
There is a difference between compilers.