如何在Linux下将std::string转换为System::string? 一个非常简单的C++问题: const System::String foo = bar
其中如何在Linux下将std::string转换为System::string? 一个非常简单的C++问题: const System::String foo = bar,c++,mono,C++,Mono,其中bar是std:string 如何将bar转换为System::String?我知道已经有很多答案,但它们似乎都基于Microsoft库,例如: System::String^ result = msclr::interop::marshal_as<System::String^>(str.c_str()); System::String^result=msclr::interop::marshal_as(str.c_str()); 一、 但是,不要将封送为。我需要它在Lin
bar
是std:string
如何将bar
转换为System::String
?我知道已经有很多答案,但它们似乎都基于Microsoft库,例如:
System::String^ result = msclr::interop::marshal_as<System::String^>(str.c_str());
System::String^result=msclr::interop::marshal_as(str.c_str());
一、 但是,不要将封送为。我需要它在Linux(Ubuntu 20.04)下工作
BTW,我不是C++的家伙,所以这整个事情对我来说是新的。< /P>