Original Post
Hi Can anybody help me out in this? I need to convert a 'TChar*' to String. Please help me out. Bharath
#ifndef UNICODEtypedef std::string String #elsetypedef std::wstring String #endifTCHAR *tchar_string = "a string";std:string string_string (tchar_string);TCHAR *tchar_string = "a string";std:wstring string_string (tchar_string);Quote:TCHAR already resolves to the correct type, why not use it?
Original post by Ashkan
#ifndef UNICODE
typedef std::string String
#else
typedef std::wstring String
#endif
Quote:
I am using .NET editor for the C++ coding.
This topic has been locked by a moderator. New replies are not allowed.
GameDev.net uses cookies to ensure you have the best experience on our platform. Learn more