using struct tm, time_t, and time to create a simple clock source code

This snippet submitted by Dieter Manstein on 2006-10-12. It has been viewed 6510 times.
Rating of 5.6 with 12 votes

#include <stdio.h>
#include <time.h>
#include <stdlib.h>

int main()
    struct tm *tmp;
    time_t s;
    tmp = localtime(&s);
    return 0;

More C and C++ source code snippets

Add a snippet!