K
Knut Olsen-Solberg
This is the program:
The Form has 3 TextBoxes and 1 Button. The user uses the keyboard to
enter a number in each of the two first TexBoxes, presses the Button,
and the sum of the numbers appears in the third TextBox.
In Borland Builder the OnClick event of the Button can look like this
(if the TextBoxes are named N1, N2 and N3):
void __fastcall TForm1::Button1Click(TObject *Sender)
{
double A = N1->Text.ToDouble();
double B = N2->Text.ToDouble();
N3->Text=A+B;
}
In MS Visual C++ 2005 Express Edition I miss the ToDouble function. How
can it be done here? Can anyone help ?
Regards Knut
The Form has 3 TextBoxes and 1 Button. The user uses the keyboard to
enter a number in each of the two first TexBoxes, presses the Button,
and the sum of the numbers appears in the third TextBox.
In Borland Builder the OnClick event of the Button can look like this
(if the TextBoxes are named N1, N2 and N3):
void __fastcall TForm1::Button1Click(TObject *Sender)
{
double A = N1->Text.ToDouble();
double B = N2->Text.ToDouble();
N3->Text=A+B;
}
In MS Visual C++ 2005 Express Edition I miss the ToDouble function. How
can it be done here? Can anyone help ?
Regards Knut