Convert String^ in c# to CString in c++/CLI

后端 未结 2 1783
南方客
南方客 2020-12-02 01:53

I need a help on one question where I stuck while coding my app in MFC.

I am using CLR i.e Common Language Runtime in my appli

2条回答
  •  孤街浪徒
    2020-12-02 02:28

    Consider reading this MSDN thread about string conversions. Also, following discussions may be useful for you:

    • Convert CString to std::wstring
    • Problem: How to convert CString into const char * in C++ MFC
    • Converting String to Cstring in c++
    • CString to LPCTSTR conversion
    • Conversion of CString to char
    • How to convert _bstr_t to CString

    With this material you can find out how to do it and even post own solution as an answer

提交回复
热议问题