如何在vC++中将'System :: String ^'转换为'const char *'?在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 *'
请帮助我。
可能重复的[如何将System :: String ^转换为const char *?](http://stackoverflow.com/questions/1098431/how-do-i-convert-a-systemstring -to-const-char) – shf301
[如何将System :: String转换为const char * *]可能的重复(http://stackoverflow.com/questions/29335426/how-to-convert-systemstring-to-const -char) –