please hep textBox1->Text = s;
string s;
s = "kamil";
textBox1->Text = s;
and I have an error message
1>Dizi.cpp
1>c:\vc\dizi\dizi\Form1.h(112) : error C2664: 'void System::Windows::Forms::Control::Text::set(System::String ^)' : cannot convert parameter 1 from 'std::string' to 'System::String ^'
1> No user-defined-conversion operator available, or
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>Build log was saved at "file://c:\VC\Dizi\Dizi\Release\BuildLog.htm"
1>Dizi - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
please help me?
Re: please hep textBox1->Text = s;
Your code is managed C++, not native C++. Try posting your question here.
Re: please hep textBox1->Text = s;
First, take a look at this discussion: http://www.codeguru.com/forum/showthread.php?t=511412
[ Moved thread ]
Re: please hep textBox1->Text = s;
Re: please hep textBox1->Text = s;
I solved problem. Thanks for all;
mktArray < char * > * le = new mktArray < char * >;
le->Add("kamil");
le->Add("turan");
le->Add("safranbolu");
String ^ s = gcnew String(le->Get(0));
textBox1->Text = s;
delete le;
I can convert char * to string that use String ^ s = gcnew String.
Re: please hep textBox1->Text = s;
Quote:
Originally Posted by
mkamilturan
string s;
s = "kamil";
textBox1->Text = s;
The simplest way:
Code:
String^ txt = "Kamil";
textBox1->Text = txt;
Cheers
Re: please hep textBox1->Text = s;
im pretty sure that all you have to do is:
this->textBox1->Tekst = s;