Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int _tmain(int argc, _TCHAR* argv[])
- {
- FILE *f;
- time_t rawtime;
- struct tm * timeinfo;
- while (TRUE){
- f = fopen("TestFile.txt", "a");
- time(&rawtime);
- timeinfo = localtime(&rawtime);
- fprintf(f, "Current local time and date: %s", asctime(timeinfo));
- printf("Current local time and date: %s", asctime(timeinfo));
- fclose(f);
- Sleep(1000);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement