Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
gprentice is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: TIme and Idle
Next Topic: Some code to add an icon in statusbar
Goto Forum:
  


Current Time: Sun Apr 27 12:54:24 CEST 2025

Total time taken to generate the page: 0.00825 seconds