Home » Community » Newbie corner » Writing Float big-endian on Windows
Re: Writing Float big-endian on Windows [message #31376 is a reply to message #31356] |
Sat, 26 February 2011 06:28   |
gprentice
Messages: 260 Registered: November 2005 Location: New Zealand
|
Experienced Member |
|
|
If you care about portability you shouldn't assume that int is 32 bits or that float is 32 bits. They don't have to be the same size.
Also, I don't know why stream provides big endian and little endian functions instead of choosing automatically but assuming that float is big endian isn't exactly portable either. If you use Get and Put I wonder why would you care about how it's stored?
Graeme
[Updated on: Sat, 26 February 2011 06:29] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Apr 27 12:54:24 CEST 2025
Total time taken to generate the page: 0.00825 seconds
|