Convert const char* to wstring

后端 未结 7 746
难免孤独
难免孤独 2020-12-03 01:24

I\'m working on a native extension for a zinc based flash application and I need to convert a const char* to a wstring.

This is my code:

相关标签:
7条回答
  • 2020-12-03 01:52

    You can convert char string to wstring directly as following code:

    char buf1[] = "12345678901234567890";
    wstring ws(&buf1[0], &buf1[20]);
    
    0 讨论(0)
提交回复
热议问题