标签:c++
话不多说,直接上代码。
#include <iostream>
using namespace std;
int main()
{
    unsigned int *data = new unsigned;
    unsigned char *byte;
    *data = 0x000000ff;
    cout<<*data<<endl;
    
    byte = (unsigned char *)data;
    
    //低位存储在低地址 
    for(int i=0;i<4;++i)
    {
        cout<<(int)(*(byte+i))<<endl;
    }
    system("pause");
    return 0;
}
 
运行结果:
 
标签:c++
原文地址:http://blog.csdn.net/wxb1553725576/article/details/42102681