카페 > 프로그래머들의 세계 | 필더 http://cafe.naver.com/programmers/649 문자열 다루기 STL의 string을 사용 #include <TCHAR.h> #include <string> namespace std { typedef basic_string<TCHAR> tstring; } To be continued... static 함수 및 버퍼 사용 /** * Maps a character string to a wide-character (Unicode) string. * @param[in] lpsz ASCII string * @return UNICODE string */ static WCHAR* ToWChar(LPCSTR* lpsz) { static WCHAR wszBuffer[1024]; _wcsset(wszBuffer, 0); int nWStrLen = /* the number of wide characters written to the buffer */ MultiByteToWideChar( CP_ACP, /* CodePage: ANSI code page */ 0, /* dwFlags: character-type options */ lpsz, /* lpMultiByteStr: string to map */ -1, /* cbMultiByte: number of bytes in string */ wszBuffer, /* lpWideCharStr: wide-character buffer */ 1024); /* cchWideChar: size of...