0

What exactly does this mean --> Time(NULL)

I wonder what this mean.

4th Nov 2016, 7:40 AM
Jenilyn Salonga
Jenilyn Salonga - avatar
2 Antworten
0
It's very simple. In the C++ versions before C++11 the NULL macro was used to signal that a pointer is a null pointer (i.e. a pointer that points to an invalid address). The NULL macro is 0 in all definitions I know. Ergo "time(NULL)" means "time(0)" which returns the seconds since so-called "epoch": 1.1.1970 00:00:00
4th Nov 2016, 8:35 AM
Stefan
Stefan - avatar
0
haha .. iloveyou
5th Nov 2016, 1:15 AM
KG Feignh
KG Feignh - avatar