Subj : Re: I need a routine to convert a real48 type into a double To : borland.public.cpp.borlandcpp From : Tales Aguiar Date : Fri Aug 05 2005 04:22 pm I don't now if has a more easy way. I would create a function in .pas file like... unit XXX; interface type TReal48__ = packed array[0..6] of byte; function Real48ToDouble(value: TReal48__): Double; implementation function Real48ToDouble(value: TReal48__): Double; type PReal48 = ^Real48; begin result := PReal48(@value)^; end; end. and use it... Tales Aguiar. "E. Kali" wrote in message news:42ef32d4$1@newsgroups.borland.com... > Hi all, > > I've got the following problem. I'm reading data out of a binary file which > had been written by a Delphi application. > The data structure of the delphi application which wrote the data looks like > this--> > > TMyDelphiRecord = packed record > aReal48Value : Real48; > aByteValue : Byte; > aWordValue : Word; > and so on... > end; > > My C++ Builder application reads the into a data structure like this > > struct TMyCBuilderStruct{ > unsigned char aReal48Value[6]; > unsigned char aByteValue; > unsiged short aWordValue; > and so on... > }; > > My question ==> how can I convert the aReal48Value into a valid c++ double > value?. > > Thanks in advance! > > > > > > > > .