i want to convert char array element into hexadecimal value. But the code i wrote is not giving the output as i expect.
unsigned char in[256];
void Text(const char *Buffer)
{
static char tempValue[256];
for(int i=0;i<=len;i++)
{
sprintf(&tempValue[i],"%02x", (unsigned char)Buffer[i]);
in[i]=(unsigned char)tempValue[i];
cout<<"HexaValue"<<in[i];
}
}
this is not working as i wanted.
i want..
unsigned char in[] = {0x0044,ox0055,.....};
can anyone help me to correct this...