0
void hex2str(int value, char& str);

int a = 0x1014;
int b = 0x7FFF;

char cstr1[8], cstr2[8];
hex2str(a, cstr1);
hex2str(b, cstr2);

Now these two char arrays are:

cstr1[] == {'1', '0', '1', '4', '\0', ...}

cstr2[] == {'7', 'F', 'F', 'F', '\0', ...}

Have no idea, how to achieve that. Any help?

user3600124
  • 829
  • 1
  • 7
  • 19

0 Answers0