69,373
社区成员
发帖
与我相关
我的任务
分享
int itest = 257;
for(int i=0;i<4;i++)
{
cout<<" ["<<i<<"] = "<< int(((char*)(&itest))[i])<<endl;
}
cout<<" itest = "<<itest<<endl;
cout<<" ntohl = "<<ntohl(itest)<<endl;
cout<<" htonl = "<<htonl(itest)<<endl;
return 0;