Getting a std string into a String^

This is a discussion on Getting a std string into a String^ within the Windows Programming forums, part of the Platform Specific Boards category; Hi, I am trying to set the text of a textbox but textboxes only take String^ not std::string. I have ...

Getting a std string into a String^

Hi, I am trying to set the text of a textbox but textboxes only take String^ not std::string. I have a function to change a String^ into a std::string but not vice versa. According to this you can simply do: String^ s = somestring.c_str(). Here is my code followed by the error.