如何在vc ++中将'System :: String ^'转换为'const char*'?
我的代码:
String ^Result1= "C:/Users/Dev/Desktop/imag.jpg";
IplImage *img1 = cvLoadImage(Result1, 1);
如果我喜欢上面它会产生以下错误.
error C2664: 'cvLoadImage' : cannot convert parameter 1 from 'System::String ^' to 'const char *'
请帮我.
如何将'String ^'转换为'const char*'?
String^ cr = ("netsh wlan set hostednetwork mode=allow ssid=" + this->txtSSID->Text + " key=" + this->txtPASS->Text);
system(cr);
Run Code Online (Sandbox Code Playgroud)
错误:
1 IntelliSense: argument of type "System::String ^" is incompatible with parameter of type "const char *"
Run Code Online (Sandbox Code Playgroud)