错误:无法从' std :: string'转换参数1到' System :: String

时间:2015-07-12 18:35:51

标签: visual-studio-2010 visual-c++ c++-cli stdstring

我必须计算一些字符串,然后将其结果打印在texbox中。 首先是它的定义:

             // Mittelwert_Stf
             // 
             this->Mittelwert_Stf->BackColor = System::Drawing::SystemColors::Window;
             this->Mittelwert_Stf->Location = System::Drawing::Point(264, 443);
             this->Mittelwert_Stf->Name = L"Mittelwert_Stf";
             this->Mittelwert_Stf->Size = System::Drawing::Size(293, 20);
             this->Mittelwert_Stf->TabIndex = 105;
             this->Mittelwert_Stf->Text = L"-";

然后我做了一些计算,然后我想使用:

连接到字符串
    std::string stuffe = std::string("Stufe 7") + "wahrscheinlich";
    Mittelwert_Stf->Text = stuffe;

但我有以下错误:

void System::Windows::Forms::Control::Text::set(System::String ^)' : cannot convert parameter 1 from 'std::string' to 'System::String ^'

有人请帮助我如何骑车?

0 个答案:

没有答案