Yeah, I figured it out.
For those who are interested, the bottom of the header should have looked like this:
Code:
private: System::Void btnE_Click(System::Object^ sender, System::EventArgs^ e) {
if(rbAdd->Checked){
result = result + Double::Parse(txtE->Text);
txtE->Text = result.ToString();
rbAdd->Checked = false;
}
if(rbSub->Checked){
result = result - Double::Parse(txtE->Text);
txtE->Text = result.ToString();
rbSub->Checked = false;
}
if(rbMult->Checked){
result = result * Double::Parse(txtE->Text);
txtE->Text = result.ToString();
rbMult->Checked = false;
}
if(rbDiv->Checked){
result = result / Double::Parse(txtE->Text);
// txtE->Text = result;
rbDiv->Checked = false;
}
}
}; And then the .cpp should have looked like this:
Code:
// CalculatorC.cpp : main project file.
#include "stdafx.h"
#include "Form1.h"
using namespace CalculatorC;
[STAThreadAttribute]
int main(array<System::String ^> ^args)
{
// Enabling Windows XP visual effects before any controls are created
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
// Create the main window and run it
Application::Run(gcnew Form1());
return 0;
}
}; Brackets.