티스토리 뷰

전형적인 윈도우 스타일.

string과 wstring 사이에서 혼란을 겪지 않아도 되므로 편리함

 

사용법 - 아래 선언을 stdafx.h에 포함해서 사용

1)

#ifdef _UNICODE
typedef std::wstring tstring;
#else
typedef std::string tstring;
#endif

2)

typedef std::basic_string<TCHAR> tstring;

std::string은 std::basic_string<char>의 인스턴스,

std::wstring은 std::basic_string<wchar>의 인스턴스이다.

따라서 std::basic_string<TCHAR>로 가능함.

 

 

 

출처 : https://m.blog.naver.com/PostView.nhn?blogId=nine01223&logNo=220443106588&proxyReferer=https:%2F%2Fwww.google.com%2F

'윈도우 프로그래밍' 카테고리의 다른 글

C# 4.0 정규식 모음  (0) 2021.03.15
inpect.exe for win10  (0) 2020.06.24
"", L"", TEXT(""), _T("")의 차이  (0) 2020.06.16
공지사항
최근에 올라온 글
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28