System::String^转换为char*
char* ch= (char*)(void*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(str);
将char*转换为System::String^
String^ str= System::Runtime::InteropServices::Marshal::PtrToStringAnsi((IntPtr)ch);
System::String^转换为char*
char* ch= (char*)(void*)System::Runtime::InteropServices::Marshal::StringToHGlobalAnsi(str);
将char*转换为System::String^
String^ str= System::Runtime::InteropServices::Marshal::PtrToStringAnsi((IntPtr)ch);