Answer the question
In order to leave comments, you need to log in
How to fix the following errors in the code?
According to the assignment, you need to do a simple test, after which the number of points received during the test is displayed. I'm using VS2019, CLR project (.NET Framework)
I wanted to write the calculation of points in the properties of the "Finish" button, however I don't know C++ case in Windows.Forms well, from the examples there was only something similar in C#.
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
int bal = 0;
if (radioButton4_CheckedChanged) bal = bal + 1;
if (radioButton6_CheckedChanged) bal = bal + 1;
if (radioButton10_CheckedChanged) bal = bal + 1;
if (radioButton14_CheckedChanged) bal = bal + 1;
if (radioButton19_CheckedChanged) bal = bal + 1;
if (checkBox1_CheckedChanged && checkBox2_CheckenChanged) bal = bal + 1;
if (checkBox5_CheckedChanged && checkBox7_CheckenChanged) bal = bal + 1;
if (checkBox9_CheckedChanged && checkBox10_CheckenChanged) bal = bal + 1;
if (checkBox15_CheckedChanged && checkBox4_CheckenChanged) bal = bal + 1;
}
Answer the question
In order to leave comments, you need to log in
All subsequent radioButton and checkBox are undefined: identifier "radioButton6_CheckedChanged" is undefined".Well, they even tell you in Russian that you don’t have such variables
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question