cannot convert from 'std::string' to 'LPSTR'

前端 未结 6 2051
故里飘歌
故里飘歌 2020-12-09 16:12

As I clould not pass LPCSTR from one function to another (Data get changed) I tried passing it as a string.

But later I need to again convert it back to LPSTR. While

6条回答
  •  囚心锁ツ
    2020-12-09 17:01

    An LPSTR can be substituted with by using a TCHAR (i.e. found in tchar.h). So if you have a std::string, you can use the method std::string::c_str().

提交回复
热议问题