cText is an array of char, also representable as char*.
Your function's return value is a single char.

If you want to return the first character in the array, write
Qt Code:
  1. return cText[0];
To copy to clipboard, switch view to plain text mode 

BTW, your sprintf() is wrong, the target buffer comes first, then the format string then the arguments specified in the format string.

Cheers,
_