Abhishek wrote:
how to do convert a std::string to LPTSTR (chat *) datatype
regards
Abhishek
Abhishek:
Modern windows programming is best done using a Unicode build, for which
LPTSTR is a wide character string. Also, to convert a std::string to a
C-style string without copying you can only obtain a constant string
(LPCTSTR).
Perhaps you really want something like the following
typedef std::basic_string<TCHARtstring;
tstring str = _T("Hello world");
LPCTSTR buf = str.c_str();