티스토리 뷰
전형적인 윈도우 스타일.
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>로 가능함.
'윈도우 프로그래밍' 카테고리의 다른 글
C# 4.0 정규식 모음 (0) | 2021.03.15 |
---|---|
inpect.exe for win10 (0) | 2020.06.24 |
"", L"", TEXT(""), _T("")의 차이 (0) | 2020.06.16 |