double value=3.14;
unsigned char *p=(unsigned char *)&value;;
for (int i=0;i<8;i++)
{
qDebug() << QString::number(p[i],16);
}
输出结果
"1f"
"85"
"eb"
"51"
"b8"
"1e"
"9"
"40"
double value=3.14;
unsigned char *p=(unsigned char *)&value;;
for (int i=0;i<8;i++)
{
qDebug() << QString::number(p[i],16);
}
输出结果
"1f"
"85"
"eb"
"51"
"b8"
"1e"
"9"
"40"