At 20:22 07/06/98 +0100, Glynn Clements wrote:
>
>Ibrahim Haddad wrote:
>
>> > Can you please try to explain what you are trying to do? (type casting
>> > is most likely the wrong thing to do here).
>> 
>> I an generating 2 floating number (sample number: 12.193). 
>> I need to write these numbers in a file called "bcocomo-log"
>> in the following format:
>> num1  num2
>> num3  num4
>> num5  num6
>> and so on
>> 
>> That's all.
>
>In which case you need to use something like:
How about something like 

fprintf(fp,"%c%c%c%c",num1>>24,(num1<<8)>>24,(num1<<16)>>24,(num1<<24)>>24);


>
>       fprintf(fp, "%f %f\n", num1, num2);
>
>to write them and
>
>       fscanf(fp, "%f %f\n", &num1, &num2);
>
>to read them.
>
>-- 
>Glynn Clements <[EMAIL PROTECTED]>
>
>
If our brain was so simple we could understand it 
we would be so simple we wouldn't understand it.

Victor Hugo de Oliveira
[EMAIL PROTECTED]

Reply via email to