<snip?
>>I am now having trouble converting a hex string (such as AF79E00) into it's
>>corresponding long value (184,000,000).
>>
>>Any ideas?
>>
>
> float fTime = *(float *)&buffer[offset];

That will cast the 4 bytes of the ascii chars to a float value, which
won't be the float value of the hex string. Try

     long int strtol(const char *nptr, char **endptr, int base);

:)


>
> Jeffrey "botman" Broome
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives, please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>


--
Alfred Reynolds
[EMAIL PROTECTED]

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to