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   |
|
Oups, gprentice is right about the int 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 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
|
|
|
Goto Forum:
Current Time: Sun Apr 27 13:02:44 CEST 2025
Total time taken to generate the page: 0.00726 seconds
|