Where The Streets Have No Name

CString ⇔ char* 본문

Developement/C, C++, C#

CString ⇔ char*

highheat 2008. 5. 23. 18:37
출처 : http://blog.naver.com/mind2on/80009619180

CString ⇒ char*

CString str;
str = "Hello";
char* ss = LPSTR(LPCTSTR(str));


char* ⇒ CString

char ss[] = "Hello";
CString str;
str.Format("%s", ss);

(Format대신에 GetBuffer()를 써도 됩니다.)