问题描述
if(tlv_tag_compare(tags.pTagID,\ x9F \ x91 \ x8B \ x15))
{
uint8 * ptr = tags.pTagID;
uint8 ch [4];
uint8 k = 0;
for(k = 0; k
{
ch [k] = * ptr;
++ ptr;
}
uint8 temp [4];
sprintf(temp,%02x%02x%02x%02x,ch [0],ch [1],ch [2],ch [3]);
im尝试检查pTagID的值,我得到的是9F 91 8B 15
我的临时身份不同
谁能告诉我什么是不正确的?
pTag IS是一个uint8 const *
if (tlv_tag_compare(tags.pTagID, "\x9F\x91\x8B\x15"))
{
uint8 *ptr = tags.pTagID;
uint8 ch[4];
uint8 k=0;
for(k=0; k<=3;k++)
{
ch[k]=*ptr;
++ptr;
}
uint8 temp[4];
sprintf(temp,"%02x%02x%02x%02x",ch[0],ch[1],ch[2],ch[3]);
i m trying to examine the value of pTagID and I shoudl be getting 9F 91 8B 15
what i m getting in temp id different
can anyone tell me what is not correct?
pTag IS is a uint8 const*
推荐答案
这篇关于获得ptr所拥有的价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!