#include <stdio.h>
#include <string.h>
#include <time.h>
int main()
{
char n[100]= {};
int i=0,m=0;
scanf("%s %n",n,&m);
FILE *fp;
struct tm* now;
time_t now_t;
fp = fopen("C:\\Users\\spca\\Downloads\\resultSave.txt", "rb");
int str[100][100]={};
for(int i=0; i<10;i++)
{
fscanf(fp,"%s",str[i]);
printf("%s\n",str[i]);
}
if(fp==NULL)
{
printf("dertfgv");
return 0;
}
time(&now_t); // 현재 시간을 now_t에 time_t 형태로 저장
now = localtime(&now_t);
fclose(fp);
int size=i;
fp = fopen("C:\\Users\\spca\\Downloads\\resultSave.txt", "ab");
fprintf(fp,"%s,%d:%d\n",n,now->tm_hour,now->tm_min);
if(fp!=NULL)fclose(fp);
return 0;
}