![]() |
convert char array to CString
How should i convert char array to CString
Code:
In my user.cpp file In Spread_name, Private_group value are coming all right (showing proper string) but after giving a breakpoint my a.format value out put is some what like this Code:
User: connected to localhost;[][][][][[][][][][] with private group[][][]][[]][][]][] |
Re: convert char array to CString
You're probably using a UNICODE build so CString is a CStringW and its Format member expects wide string arguments (wchar_t and not char). You an convert it in the format string though by using a capital 'S' as so:
Code:
char Spread_name[20], Private_group[20];Code:
wchar_t Spread_name[20, Private_group[20];Code:
TCHAR Spread_name[20, Private_group[20]; |
| All times are GMT +5.5. The time now is 09:28. |