1 2 3 4
|
private: System::Void pictureBox1_DoubleClick(System::Object^ sender, System::EventArgs^ e)
{
succeed=+1;
}
|
Inside a function, the following variables exist:
Any global variables.
Any variables passed into the function.
Any variables created inside the function.
If the function is a class function, any class variables of that class.
In the function above succeed is not a global function, was not passed into the function, was not created in the function, and the function is not a class function. So the variable succeed does not exist in the function.
In the other function, you have this:
int succeed = 0;
which creates the variable succeed
within that function.
Also, this isn't C++. Looks like some kind of Microsoft .NET or managed language.
Edit: I am SO ninjar!