1. char* 转String^
System::String ^str;
char* txt;
str = gcnew String(txt);
2.String^转char*
以下是MSDN一面的一个例子Visual C++ Copy Code :
using namespace System;
using namespace System::Runtime::InteropServices;
#include <iostream> // for printf<
1. char* 转String^
System::String ^str;
char* txt;
str = gcnew String(txt);
2.String^转char*
以下是MSDN一面的一个例子Visual C++ Copy Code :
using namespace System;
using namespace System::Runtime::InteropServices;
#include <iostream> // for printf<