Boost C++ Libraries: Ticket #6309: cannot convert from 'CString' to 'boost::filesystem3::path' https://svn.boost.org/trac10/ticket/6309 <p> using the code below: <strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong>* </strong></p> <p> CString m_ImagesSubFolder; path m_ImageFolder = m_ImagesSubFolder; </p> <p> <strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong>* </strong></p> <p> Error 7291 error C2440: 'initializing' : cannot convert from 'CString' to 'boost::filesystem3::path' </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6309 Trac 1.4.3 Beman Dawes Thu, 19 Apr 2012 12:58:32 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6309#comment:1 https://svn.boost.org/trac10/ticket/6309#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> I'm not a Windows programmer, but it looks like CString::operator LPCSTR is what you need to use. </p> <p> Try something like: </p> <blockquote> <p> CString m_ImagesSubFolder; path m_ImageFolder = (LPCSTR) m_ImagesSubFolder; </p> </blockquote> <p> HTH, </p> <p> --Beman </p> Ticket