0

I'd like to convert a int digit to a char (no to convert from ascii code). I'd like to convert it from int type to char type. (Example: from 5 to '5') Is it possible?

Moldytzu
  • 25
  • 9

1 Answers1

-1

Use:

int x = 5; char c = '0' + x;  // c == '5'
Moldytzu
  • 25
  • 9