I've been working on a calculator program for a couple weeks now, and I'm stuck on how I can get the program to actually do the calculations.
The short story is this:
Let's say I have a string from the calculator that is "3 + 3"
I can already convert it to int and have it display a result, but my result is not 6... it gives me 33!
This is the code for my "add" button
private void uxAdd_Click(object sender, EventArgs e)
{
input = false;
display = true;
decimalpoint = false;
calc = calc + " + ";
Event_Handler(this, null);
}
And this is the code for my "equals" button
private void uxEquals_Click(object sender, EventArgs e)
{
int calcparse = Int32.Parse(calc);
int calcint = Convert.ToInt32(calc);
String numdisplay = calcint.ToString();
Event_Handler(this, numdisplay);
}
My professor isn't being much help (as many of them aren't) so any help from here would be great. I've been searching numerous forums for an answer and can't find much (unless I'm completely oblivious to an obvious answer)