std::string to LPCTSTR

后端 未结 7 1307
甜味超标
甜味超标 2021-02-19 10:30

New version of the typical question of how to convert from std::string to LPCTSTR.

Reading from different SO posts I learnt that I should do th

7条回答
  •  借酒劲吻你
    2021-02-19 11:32

    I have struggled with this for quite a while. After quite a bit of digging I found this works the best; you could try the following:

    std::string t = "xyz";
    CA2T wt (t.c_str());     
    

提交回复
热议问题