Simple bitwise manipulation for little-endian integer, in big-endian machine?
问题 For a specific need I am building a four byte integer out of four one byte chars, using nothing too special (on my little endian platform): return (( v1 << 24) | (v2 << 16) | (v3 << 8) | v4); I am aware that an integer stored in a big endian machine would look like AB BC CD DE instead of DE CD BC AB of little endianness, although would it affect the my operation completely in that I will be shifting incorrectly, or will it just cause a correct result that is stored in reverse and needs to be