Hi guys I´m trying to execute a formula, for example pow(x,2), comming from an Edit1 in the main form of my program and show result in an Edit2. However I don´t know how to convert this String in a literal instruction that the program can execute;
please suppose that we have:
#include <math.h> ...etc
double x=3;
String formula = pow(x,2);
Edit2->Text=formula;
// This works and Edit2 shows a value of 9
However when the String is obtained from an Edit, this is what happens:
double x = 3;
String formula = Edit1->Text;
Edit2->Text=formula;
// This doesn´t work and Edit2 shows the formula as a characters string, I mean "pow(x,2)"
How can I get that?
Many thank in advance