D
Demosthenes
I am using visual c++ 2003 i believe.
I created a new win32 application, and put 1 button on the form and
changed it's text to "Start".
and this code does not work:
private: System::Void button1_Click(System::Object * sender,
System::EventArgs * e)
{
if (button1->Text == "Start")
{
button1->Text = "Stop";
}
else
{
button1->Text == "Start";
}
}
the project compiles ok, but when the code executes, the if statement
always goes to the else clause. The text on the button is "Start"
though. I think I am not understanding some fundamental concepts
with
pointers/objects....
I created a new win32 application, and put 1 button on the form and
changed it's text to "Start".
and this code does not work:
private: System::Void button1_Click(System::Object * sender,
System::EventArgs * e)
{
if (button1->Text == "Start")
{
button1->Text = "Stop";
}
else
{
button1->Text == "Start";
}
}
the project compiles ok, but when the code executes, the if statement
always goes to the else clause. The text on the button is "Start"
though. I think I am not understanding some fundamental concepts
with
pointers/objects....