0

Goodmorning,

Can anyone tell me how to convert a TCHAR to a std::string ??

Thanks....

2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by disc
0

TCHAR is just a macro that is defined to be either char* or wchar_t*, depending on whether your program is compiled with UNICODE or not. If not UNICODE then use just simple assignment to convert to std::string. If the program is UNICODE then use one of the conversion functions, such as wcstombs(). That function works ok with English language, but I don't know about other languages.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.