Subj : Re: Any help on why? To : borland.public.cpp.borlandcpp From : maeder Date : Thu Jul 08 2004 07:11 pm Bob Gonder writes: >> In contrary to your code, mine is at least correct. > > Not quite, yours is also wrong-endian on Win/Intel. Mine is endianness agnostic. >>>>double d(3.11415); >>>>unsigned char const *const begin(reinterpret_cast(&d)); >>>>unsigned char const *const end(begin + sizeof d); >>>>for (unsigned char const *c = begin; c!=end; ++c) > > Should be c=end-1, c>= begin; --c That would have undefined behavior when c is moved to begin-1. > Go along with that, but maybe better would be to fire those inept > programmers (or retrain them). After all these things you posted in this thread, I doubt that you are in a position to ask somebody else to get retrained, I'm afraid. .