Convert String* to char*

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a managed C++ app in which i need to convert String * to char *.
How can i achive this?.


regards
-sarab
 
sarab said:
Hi,
I have a managed C++ app in which i need to convert String * to
char *. How can i achive this?.

See System.String.PtrToStringChars() to get a wchar_t __pin*. You can then
use wcstombs() or WideCharToMultiByte() to convert that wide-character
string to a narrow-character string.

-cd
 
Back
Top