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 #31377 is a reply to message #31355] Sat, 26 February 2011 07:27 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Oups, gprentice is right about the int Smile In U++ you should use int32 or some similar type where the length is guaranteed. In standard c++ there is int32_t defined somewhere.

As for to reason for using certain endianness, I can see at least two Smile First, if you want to store data on one machine and read them on other, which has possible different architecture. Second, there is many standard file formats which have prescribed endianness (it is actually related to the first case), so that you have to obey it, even if you will always run it on the same machine, because otherwise other application wouldn't interpret the file correctly.

Honza
 
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 13:02:44 CEST 2025

Total time taken to generate the page: 0.00726 seconds