본문 바로가기

MS/C++

멀티바이트 --> 유니코드 (매크로)

출처 : http://blog.naver.com/pkban/130077881659


유니코드 환경에서는
#include <tchar.h>를 하고

char은 TCHAR

LPSTR(char*) -> LPTSTR

LPCSTR(const char*) -> LPCTSTR

로 사용하면 된다.

함수는 다음과 같이 변경하자

strcpy -> _tcscpy

strlen  -> _tcslen

strcmp -> _tcscmp

fopen -> _tfopen

atof    -> _tcstod

atoi    -> _ttoi

atol    -> _ttol


맨날 찾아 가기 귀찮아서 퍼옴