From: "Mark Wilden" <[EMAIL PROTECTED]>
> Op #2:  MemMove(fRecPOne, fRecPTwo, sizeof(FlightDB));
>
> Op #3:  MemMove(fRecPOne, fRecPTwo, sizeof *fRecPOne);
> 
> is better than #2 since it doesn't hard-code the type in as many places.
> 
True, but if you forget that critical * the code will compile
and run but not do what you want.  I prefer the explicit
type because it's harder to screw up.  Hmm, what would
be really cool is a pre-processor function to insert the
type of a variable - then we'd avoid the repeated reference
you don't like and the dangerous coding I don't like.

Chris Tutty (heading off-topic at full speed).


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to