easy hex/float conversion
Posted
by yeus
on Stack Overflow
See other posts from Stack Overflow
or by yeus
Published on 2010-03-11T17:03:58Z
Indexed on
2010/03/11
19:04 UTC
Read the original article
Hit count: 211
I am doing some input/output between a c++ and a python program (only floating point values) python has a nice feature of converting floating point values to hex-numbers and back as you can see in this link:
http://docs.python.org/library/stdtypes.html#additional-methods-on-float
Is there an easy way in C++ to to something similar? and convert the python output back to C++ double/float? This way I would not have the problem of rounding errors when exchanging data between the two processes...
thx for the answers!
© Stack Overflow or respective owner