Hello, hope someone can help me. I was wondering if there was an easy, portable way(I know I'm asking alot) to switch the byte order of an integer. From what I've found so far, I can use some functions in winsock2.h, but I can't seem to link it, and it isn't very portable anyways.
In case I'm being a little unclear, here's what i mean:
I have an int that outputs to a file as (in hex) A0 13 00 00, but I need it to output as 00 00 13 A0.
Thanks in advance.