Discussion:
Pointer ?
(too old to reply)
b***@gmail.com
2014-09-19 03:43:25 UTC
Permalink
uint8 const* is a ptr defining pTagID

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]);



Question I am trying to see what teh content of pTagID is which is a Ptr
the value I am getting in temp is not 9F918B15.... why not
How do you examine the value of that pTagID ?


Thanks
David Lowndes
2014-09-19 07:23:13 UTC
Permalink
Post by b***@gmail.com
Question I am trying to see what teh content of pTagID is which is a Ptr
See if this is what you're looking for.

http://blogs.msdn.com/b/habibh/archive/2009/06/05/size-specifier-how-to-display-a-c-c-pointer-as-an-array-in-the-visual-studio-debugger.aspx

Dave

Loading...