[C++] 纯文本查看 复制代码
// int 型,值为100(十进制),定位
char arr[100] = {
0x00,0x64,0x00,0x00,0x00,0x05,0x06,0x07,0x07,0x09,
0x00,0x20,0x10,0x03,0x03,0x0C,0x00,0x00,0x44,0x00,
0x00,0x33,0x00,0x47,0x0C,0x0E,0x00,0x0D,0x00,0x11,
0x00,0x00,0x00,0x02,0x64,0x00,0x00,0x00,0xAA,0x00,
0x00,0x00,0x64,0x10,0x64,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x02,0x00,0x74,0x0F,0x41,0x64,0x00,0x00,
0x00,0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x0A,0x00,
0x00,0x02,0x74,0x0F,0x41,0x00,0x06,0x08,0x00,0x00,
0x00,0x00,0x00,0x64,0x00,0x0F,0x00,0x00,0x0D,0x00,
0x00,0x00,0x23,0x00,0x00,0x64,0x00,0x00,0x00,0x00
};
int main()
{
int* p_i = (int*) arr;
int k = 0;
while (k<97)
{
char* p_in = (char*) p_i;
int* t = (int*) (p_in + k);
if (*t==100)
{
printf("%d:%d\n", k, t);
}
k++;
}
return 0;
}