C++/CLI的托管字符串std字符串和c字符串的转换

最近在搞C++/CLI,发现经常需要涉及字符串之间的传递和转换,因此记录下。 在C++/CLI中,我们可以接触到三种字符串std::string,System::string,cstring。这里我们分别称之为标准字符串,托管字符串和c语言字符串。 std::string 和 cstring cstring是一个char数组,在string.h 中直接定义了c_str方法完成std::string
相关文章
相关标签/搜索