+ 1
ctime
Cout<< time(0), returns a 10 digit number. The last 2 digits keep on changing I guess in correspondence to the systems clock. How do you make sense of this number? E.g. 1503453450
2 Answers
+ 10
that value is seconds since epoch. (1st Jan 1970). See: http://www.cplusplus.com/reference/ctime/ for more info on this
hint: localtime should do what you need
+ 1
I think this is what you were trying to do
https://code.sololearn.com/c4z5xt04UGps/?ref=app