Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to convert unsigned char value to CString without using cast to char.
All i want is to convert the values after 127 to CString.
Is it possible.
Any help will be welcome. :)

1 solution

What do you mean with
Gautam Raiker wrote:
convert unsigned char value to CString


If you need the string representation of the character the use CString::Format method, for instance:
unsigned char c = 129;
CString myString;

Share this answer
Destiny777 19-Jul-10 14:42pm    
Reason for my vote of 1
This doesn't work correctly... it would return "129" in myString!

It doesn't convert it to the actual ASCII Character that equates to 129 decimal (81 hexadecimal)!

Nice idea if you want to print the value but not the character!

DOH you!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900