Check out example codes for "c++ cli convert string to string^". It will help you in understanding the concepts better.

Code Example 1

string str = "Here";
String^ Str = gcnew String(str.c_str());

Learn ReactJs, React Native from akashmittal.com