Opened 11 years ago

Closed 11 years ago

#6309 closed Support Requests (fixed)

cannot convert from 'CString' to 'boost::filesystem3::path'

Reported by: anonymous Owned by: Beman Dawes
Milestone: To Be Determined Component: filesystem
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc:

Description

using the code below: *

CString m_ImagesSubFolder; path m_ImageFolder = m_ImagesSubFolder;

*

Error 7291 error C2440: 'initializing' : cannot convert from 'CString' to 'boost::filesystem3::path'

Change History (1)

comment:1 by Beman Dawes, 11 years ago

Resolution: fixed
Status: newclosed

I'm not a Windows programmer, but it looks like CString::operator LPCSTR is what you need to use.

Try something like:

CString m_ImagesSubFolder; path m_ImageFolder = (LPCSTR) m_ImagesSubFolder;

HTH,

--Beman

Note: See TracTickets for help on using tickets.