M
Michael
Hi,
I have had a look in the FAQ but cannot see anything related, of course that
doesn't mean it's not there.
In any case:
I have the following:
void function(){
struct tm *time2;
time_t date1;
......stuff......
time2 = localtime(&date2);
year = time2.tm_year;
}
why does the year= time2.tm_year; give me an error that says "request for
member tm_year in somthing not a structure"?
If I replace this line with printf("%s", asctime(time2)); I get a print of
the date I have set in the structure, so I know the structure has valid
data.
Can anyone help me out here?
Regards
Michael
I have had a look in the FAQ but cannot see anything related, of course that
doesn't mean it's not there.
In any case:
I have the following:
void function(){
struct tm *time2;
time_t date1;
......stuff......
time2 = localtime(&date2);
year = time2.tm_year;
}
why does the year= time2.tm_year; give me an error that says "request for
member tm_year in somthing not a structure"?
If I replace this line with printf("%s", asctime(time2)); I get a print of
the date I have set in the structure, so I know the structure has valid
data.
Can anyone help me out here?
Regards
Michael