-4

I have an array of unsigned chars with hex values and I need to make a string of them. So when I have arr[0]=2b and arr[1]=fc I want to be able to make a string s="2bfc", not the characters from ascii codes. How can I do that?

M-guy
  • 1
  • 1

1 Answers1

0

You could change to long or int and loop through adding +arr[ArrayIndex]*0x10^ArrayIndex to get one int representation of it using itoa(), then convert the int to a literal string of it. Just to outline a manual process of doing it.

marshal craft
  • 439
  • 5
  • 18