Hi guys
since I'm new to struct, I don't know how to use it properly apparently....I wanna save some time zone in a struct from scanf?
is it possible? how to save something inserted from keyboard in the struct?? however, the code seems like this :
Code:
typedef struct{
int hour;
int minute;
int second;
} date1;
printf("give your time zone as for the moment");
scanf("%d %d %d",&date1);
can you correct this so I can save the data in hour,minute and second variables?
PS: For some bad reason I must use struct in this part. other ways to save the time wouldn't be helpful