Hi guys, good day!
I have a question here pertaining to Visual C++ graphics based. I recently started out incorporating GUI into my C++ programs, in this case, a calculator.
I have a textbox named TextBox1, the user enters the numbers and operators inside it, and when the button is clicked, it outputs the result. Here is a sample input;
4+2
when the user clicks the button, it outputs 6 into a label.
Problem is, I could not obviously use cin here to get the numbers and store into my variables. Can someone show me a very simple code as to how to store 4 and 2 into my variables num1 and num2 and also, store the operator "+" into my variable "operation" of char data type.
Something like this;
double num1, num2;
double result;
num1 = TextBox1->Text; //here is the error
result = num1 + num2;
label1->text = "" + result;