IsLittleEndian macro

Tue, 29 Jan 2008 04:43:35 +0000 - Author: Peter O.

Here is an inline method to determine the byte order of the running computer.

inline int IsLittleEndian(){
  int i = 1 ;
  return (*((char *) &i )) ? 1 : 0;
}


Discussion

Other Formats