'=' not recognised

Hi,
I just started C++ and to be honest I have no idea what i am doing, however i need to create a fairly simple program for an assignment so i found a calculator tutorial on YouTube which i am following. Frustratingly i have hit many errors but this one i just cant seem to fix. It is this part at the end region of the program

private: System::Void btnDivide_Click(System::Object^ sender, System::EventArgs^ e) {
FirstNum = Convert::ToInt32(lblDisplay->Text);
lblDisplay-> ="0";
operation = '/';

For some reason the '=' in lblDisplay-> ="0"; isnt recognised.

I would be very grateful if anyone can help me without laughing at me for something that is probably very stupid ;)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#pragma endregion

	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
	}
	private: System::Void Form1_Load(System::Object^  sender, System::EventArgs^  e) {
				 this->BackColor = System::Drawing::Color::Maroon;
	}
	private: System::Void btnBlue_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->BackColor = System::Drawing::Color::Blue;
	}

	private: System::Void btnRed_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->BackColor = System::Drawing::Color::Red;
	}
	private: System::Void btnGreen_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->BackColor = System::Drawing::Color::Green;
	}
	private: System::Void btnYellow_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->BackColor = System::Drawing::Color::Yellow;
	}
	private: System::Void button4_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->BackColor = System::Drawing::Color::Purple;
	}
	private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->BackColor = System::Drawing::Color::OrangeRed;
	}
	private: System::Void button1_Click_1(System::Object^  sender, System::EventArgs^  e) {
				 this->BackColor = System::Drawing::Color::Pink;
	}
	private: System::Void button3_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->BackColor = System::Drawing::Color::Navy;
	}
	private: System::Void button8_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->BackColor = System::Drawing::Color::Gray;
	}
	private: System::Void button6_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->BackColor = System::Drawing::Color::Olive;
	}
	private: System::Void button5_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->BackColor = System::Drawing::Color::Maroon;
	}
	private: System::Void button7_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->BackColor = System::Drawing::Color::SkyBlue;
	}
	private: System::Void button12_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->BackColor = System::Drawing::Color::Black;
	}
	private: System::Void button10_Click(System::Object^  sender, System::EventArgs^  e) {
				 this->BackColor = System::Drawing::Color::White;
	}
	private: System::Void label1_Click(System::Object^  sender, System::EventArgs^  e) {
	}
	private: System::Void btn1_Click(System::Object^  sender, System::EventArgs^  e) {
				 if (lblDisplay->Text == "0"){
					 lblDisplay->Text = "1";
				 }
				 else{
					 lblDisplay->Text = Convert::ToInt32(lblDisplay->Text) + "1";

				 }
	}
	private: System::Void btn2_Click(System::Object^  sender, System::EventArgs^  e) {
				 if (lblDisplay->Text == "0"){
					 lblDisplay->Text = "2";
				 }
				 else{
					 lblDisplay->Text = Convert::ToInt32(lblDisplay->Text) + "2";

				 }
	}
private: System::Void btn3_Click(System::Object^  sender, System::EventArgs^  e) {
			 if (lblDisplay->Text == "0"){
				 lblDisplay->Text = "3";
			 }
			 else{
				 lblDisplay->Text = Convert::ToInt32(lblDisplay->Text) + "3";

			 }
}
private: System::Void btn4_Click(System::Object^  sender, System::EventArgs^  e) {
			 if (lblDisplay->Text == "0"){
				 lblDisplay->Text = "4";
			 }
			 else{
				 lblDisplay->Text = Convert::ToInt32(lblDisplay->Text) + "4";

			 }
}
private: System::Void btn5_Click(System::Object^  sender, System::EventArgs^  e) {
			 if (lblDisplay->Text == "0"){
				 lblDisplay->Text = "5";
			 }
			 else{
				 lblDisplay->Text = Convert::ToInt32(lblDisplay->Text) + "5";

			 }
}
private: System::Void btn6_Click(System::Object^  sender, System::EventArgs^  e) {
			 if (lblDisplay->Text == "0"){
				 lblDisplay->Text = "6";
			 }
			 else{
				 lblDisplay->Text = Convert::ToInt32(lblDisplay->Text) + "6";

			 }
}
private: System::Void btn7_Click(System::Object^  sender, System::EventArgs^  e) {
			 if (lblDisplay->Text == "0"){
				 lblDisplay->Text = "7";
			 }
			 else{
				 lblDisplay->Text = Convert::ToInt32(lblDisplay->Text) + "7";

			 }
}
private: System::Void btn8_Click(System::Object^  sender, System::EventArgs^  e) {
			 if (lblDisplay->Text == "0"){
				 lblDisplay->Text = "8";
			 }
			 else{
				 lblDisplay->Text = Convert::ToInt32(lblDisplay->Text) + "8";

			 }
}
private: System::Void btn9_Click(System::Object^  sender, System::EventArgs^  e) {
			 if (lblDisplay->Text == "0"){
				 lblDisplay->Text = "9";
			 }
			 else{
				 lblDisplay->Text = Convert::ToInt32(lblDisplay->Text) + "9";

			 }
}
private: System::Void btn0_Click(System::Object^  sender, System::EventArgs^  e) {
			 if (lblDisplay->Text == "0"){
				 lblDisplay->Text = "0";
			 }
			 else{
				 lblDisplay->Text = Convert::ToInt32(lblDisplay->Text) + "0";

			 }
}
	private: System::Void btnCancel_Click(System::Object^  sender, System::EventArgs^  e) {
				 lblDisplay->Text = "";
				 lblDisplay->Text = "0";
}
private: System::Void btnDivide_Click(System::Object^  sender, System::EventArgs^  e) {
			 FirstNum = Convert::ToInt32(lblDisplay->Text);
			 lblDisplay-> ="0";
			 operation = '/';
}
};
}
Compare line 149 to line 145. Looks like you've got a typo on 149.
Thanks, i honestly cant believe i wasted so long looking for that :)
Topic archived. No new replies allowed.