Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!sharkey!bnlux0!reilly From: reilly@bnlux0.bnl.gov (kevin reilly) Newsgroups: comp.sys.ibm.pc.programmer Subject: re: casting float addres into a character pointer Keywords: float address pointer Message-ID: <1931@bnlux0.bnl.gov> Date: 12 Jun 90 16:43:00 GMT Organization: Brookhaven National Lab Lines: 16 Thanks to all who submitted responses to my query on storing a float address into a character pointer. All repondents but one suggested the following: charPt = (char *)&float; Which does indeed work. QC2.5 no longer gives an error message. One respondent I don't remember who suggested using a union, which works and is much more elegant and useful for what I have to do: union { char c[2]; int number; } You can access the high or low bytes of an arbitrary integer by looking at c[1] and c[0]. Once Again thanks to all who responded.