Mark wrote:
i *think* he may have meant "note" that "number" has been initialized.
ie, elsewhere in his program that he has not shown.
however, i wouldnt know whats in i... why cant you just do
i = long(y)? or (long)y?
Perhaps because that was not the author's intent. If s/he wanted to
truncate y to the nearest whole number, s/he would have done just what
you said. If, however, s/he wanted an implementation-dependent,
bit-wise representation of y, then the nasty pointer casts may
accomplish that (depending on the sizes of the various data types).
Using reinterpret_cast would be preferred because it would signal
non-portable code.
Cheers! --M