0x11223344
大端:11 22 33 44 小端:44 33 22 11
#include<iostream>
using namespace std;
int main(){
int i=0x11223344;
char *c = (char*)&i;
if(*c==0x44){
cout<<"little_end"<<endl;
}else{
cout<<"big_end"<<endl;
}
return 0;
}