+ 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

23rd Aug 2017, 12:34 AM
Sina
Sina - avatar
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
23rd Aug 2017, 1:11 AM
jay
jay - avatar
+ 1
I think this is what you were trying to do https://code.sololearn.com/c4z5xt04UGps/?ref=app
23rd Aug 2017, 3:59 AM
Rishabh Agrawal
Rishabh Agrawal - avatar