Click here to Skip to main content
15,892,643 members
Articles / Desktop Programming / MFC

C++: Converting an MFC CString to a std::string

Rate me:
Please Sign up or sign in to vote.
4.97/5 (16 votes)
7 Apr 2011CPOL 36.3K   13  
CString m_Name;CT2CA pszName(m_Name);std::string m_NameStd(pszName);Works for me everywhere... :)

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions