im using vc++ forms. i created a textbox, im trying to get the value in it i used textBox1->Text. all im trying to do is this create a file name text.txt than write in side the file what is inside the textBox1. here the code
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
Help::ShowPopup( button1, textBox1->Text , Point(button1->Right,this->button1->Bottom) );//works here
ofstream a_file("test.txt");
a_file << textBox1->Text;//get error
a_file.close();
if ( !a_file.is_open() )
Help::ShowPopup( button1, "s" , Point(button1->Right,this->button1->Bottom) );
Application::Exit;
}
the error is this error C2679: binary '<<' : no operator found which takes a right-hand operand of type 'System::String ^' (or there is no acceptable conversion) thanks in advance rami