Which CString? Sadly, there's more than one library with a class called CString, and they all work slightly differently.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
For Microsoft MFC CString to char*, see this post . Just use CString's GetBuffer() to get the pointer to the wchar_t*.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
Would you clarify your question because I don't know what you asked???
Scroll down to the section titled "Converting from wchar_t*". Pay attention to the functions that are used, especially wcstombs_s().
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343