标签:
代码如下:
1 #include <iostream> 2 #include <arpa/inet.h> 3 #include <cstdio> 4 5 using namespace std; 6 7 int main(){ 8 9 short s=1; 10 if(s == htons(s))cout<<"大端"<<endl; 11 else cout<<"小端"<<endl; 12 13 return 0; 14 }
标签:
原文地址:http://www.cnblogs.com/hu983/p/5474568.html