How to convert std:string to CString in unicode project

前端 未结 4 1457
盖世英雄少女心
盖世英雄少女心 2020-12-09 19:06

I have a std::string. I need to convert this std:string to a Cstring.

I try to use the .c_str() but it\'s only fo

4条回答
  •  离开以前
    2020-12-09 19:15

    Unicode CString's constructor accepts char* so you can do this:

    std::string str = "string";
    CString ss(str.c_str());
    

提交回复
热议问题