C ++ / CLI从System :: String ^转换为std :: string [英] C++/CLI Converting from System::String^ to std::string
本文介绍了C ++ / CLI从System :: String ^转换为std :: string的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以发布一个可以转换的简单代码,
Can someone please post a simple code that would convert,
System::String^
To,
C ++ std :: string
我只想指定
String^ originalString;
To,
std::string newString;
推荐答案
查看系统:: Runtime :: InteropServices :: Marshal :: StringToCoTaskMemUni()
及其朋友。
我没有VS在这台机器上检查它编译之前发布。
这篇关于C ++ / CLI从System :: String ^转换为std :: string的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文