How to use TextBox text in c++ form? -
i want know there knows how can assign textbox
text in c++ windowsform
string?
in c# it's example:
string name; name=textbox1.text;
but in c++ don't know how works. i've tried this:
string name; name = name_2door_txt->text;
but visual give me error:
intellisense: no operator "=" matches these operands operand types are: std::string = system::string ^
and need string. please help?
please include following header file
#include <msclr\marshal_cppstd.h>
then try
msclr::interop::marshal_context context; std::string std_string= context.marshal_as<std::string>(name_2door_txt->text);
if want convert managed string
system::string^ managed_string = name_2door_txt->text;
Comments
Post a Comment