How to: Convert Standard String to System::String 

      string str = "test";

   cout << str << endl;

   String^ str2 = gcnew String(str.c_str());

How to: Convert System::String to wchar_t* or char*

  String ^str = "Hello";

   // Pin memory so GC can't move it while native function is called

   pin_ptr<const wchar_t> wch = PtrToStringChars(str);

第22章 Windows Forms应用程序进阶

第23章 在Windows Forms 应用程序中访问数据源

将程序从托管扩展 C++ 迁移到 C++/CLI[1]