Re: [Dev-C++] Conversion from Char* to WChar*...
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Adam J. <aj...@i-...> - 2007-08-17 20:24:52
|
>> You Wrote: >> Can any one tell me is there any way to convert char* to wchar* . You can do it this way. I would be very hesitant to do it like this. Because of the character set that is being used may not convert correctly to the anscii character set. pwideChar = reinterpret_cast<wchar_t *> (pChar); Is there a reason you are not using wstring instead of wchar_t*? In C++ it is a good habit to work with strings instead of the C style char * or wchar_t *. You can also easily convert to a char* from a string if you need to. -Adam Jones |