skip to main
|
skip to sidebar
deeply love c and c++
2008年10月30日 星期四
little endian & big endian
how to know big endian or little endian?
#include
#ifdef __BYTE_ORDER
# if __BYTE_ORDER == __LITTLE_ENDIAN
# define I_AM_LITTLE_ENDIAN
# else
# if __BYTE_ORDER == __BIG_ENDIAN
# define I_AM_BIG_ENDIAN
# else
Error: unknown byte order!
# endif
# endif
#endif /* __BYTE_ORDER */
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
網誌存檔
網誌存檔
8月 (1)
2月 (3)
1月 (2)
12月 (1)
10月 (3)
9月 (3)
7月 (4)
6月 (1)
5月 (2)
關於我自己
彼得潘
App程式設計入門 iPhone . iPad 第二版 2012.2 App程式設計入門 iPhone . iPad 第一版 2010.11
檢視我的完整簡介
沒有留言:
張貼留言