Hi everyone,
this is probably a silly question but here it goes.
I have 2 TimeType structures as follows:
TimeType start = {12,30);
TimeType end = {13,30);
and i find if i try to compare them to check if they're the same i get an
illegal operand error.
If (start == end) {.....}
So i Guess i need to compare each element one by one as follows:
if (start.hours = end.hours and start.minutes = end.minutes) {......}
This works but why wouldn't the compiler just compare the 2 chunks of mempoy
in the first case. In other words would this work??? :
if (MemCmp ((void *)&start, (void *)&end, sizeof(TimeType)) == 0) {....}
Is this a c thing that maybe c only supports comparisons of its primitive
types?
I'm just not sure why my first piece of code won't work.
Rgds,
George Bassili
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/