This line should return a const pointer to a tm structure, populated with the seconds count ( returned from the real time clock )
- struct tm *t = localtime(&seconds);
and then I want to see if the time is 5 oclock.
- if (t.tm_hour == 17 && t.tm_sec == 00 && enablealarm )
but the compiler throws two erroers on this line
"Expression must have class type (E153)" in file "/main.cpp"
either I have been in front of the PC too long this weekenmd or something else is wrong .......
Any ideas folks?
ok fixed it by doing this
struct tm t = *localtime(&seconds);
which then allows access to the contents.
Ahhh relearning C
This line should return a const pointer to a tm structure, populated with the seconds count ( returned from the real time clock )
- struct tm *t = localtime(&seconds);
and then I want to see if the time is 5 oclock.
- if (t.tm_hour == 17 && t.tm_sec == 00 && enablealarm )
but the compiler throws two erroers on this line
"Expression must have class type (E153)" in file "/main.cpp"
either I have been in front of the PC too long this weekenmd or something else is wrong .......
Any ideas folks?
ok fixed it by doing this
struct tm t = *localtime(&seconds);
which then allows access to the contents.
Ahhh relearning C