Convert from 'char *' to 'System::String ^'

Adopt from

You are writing mixed managed-unmanaged code without any need.
C++/CLR requires good knowledge of both native C++ and .NET. According to your needs, you may decide to go to pure native solution, with using MFC or WTL as UI Framework, or pure .NET solution using C#.
C++/CLI is used only in rare cases, for managed-unmanaged interoperability.
For your specific problem, tale a look at .NET String class and String.Format function, which replaces native sprintf.

By Alex F Senior Member of CodeGuru


發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *