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,483
Solved Threads: 1,407
Skill Endorsements: 54
For Microsoft MFC CString to char*, see this post. Just use CString's GetBuffer() to get the pointer to the wchar_t*.
Ancient Dragon
Achieved Level 70
32,155 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,577
Skill Endorsements: 69
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
Achieved Level 70
32,155 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,577
Skill Endorsements: 69
Question Answered as of 2 Years Ago by
Ancient Dragon
and
Narue