[CString to string]

CString CfilePath=_T("abcavc");

std::string filePath((LPSTR)(LPCTSTR)CfilePath); <- 이렇게 했더니 제대로 안뜸!!!


CT2CA pszConvertedAnsiString (CfilePath);

std::string filePath(pszConvertedAnsiString);


과 같이 바꿔주어야 한다!



[string to CString]

std::string str = "Hello";

CString Cstr(str.c_str());

'프로그래밍 > C/C++' 카테고리의 다른 글

TCHAR  (0) 2012.05.09
[MFC] 폴더 지정 대화상자로 선택한 폴더 열기  (0) 2012.05.09
CString to double  (0) 2012.05.08
[MFC] edit control 사용 방법  (0) 2012.05.08
MFC tab controller  (0) 2012.04.30
Posted by halloRa
,