+ 7

How can we output current date and time in cpp?

21st May 2019, 2:25 PM
InfinityAJ
InfinityAJ - avatar
3 Respuestas
+ 6
https://code.sololearn.com/cq39zBVgvDfX/#cpp #include <stdio.h> #include <stdlib.h> #include <time.h> int main() { time_t currTime = time(NULL); printf("%s", ctime(&currTime)); return 0; }
21st May 2019, 2:41 PM
AgentSmith
+ 8
Thanks AgentSmith
21st May 2019, 3:33 PM
InfinityAJ
InfinityAJ - avatar