Re: C++ .Net Simple Math Calculation
- From: "Peter van der Goes" <p_vandergoes@xxxxxxxxxxx>
- Date: Thu, 18 Aug 2005 07:11:08 -0500
"Ronin" <Ronin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:11299A24-F4E1-4F64-8A55-5B3346243E52@xxxxxxxxxxxxxxxx
> Group,
>
> I'm trying to add 2 textBox text... but some how does compile properly at
> all...
>
> textBox3->Text = textBox1->Text + textBox2->Text;
>
>
> How would i fix this issue? Please HELP
>
>
> Ronin
You'll need to convert the strings in the text boxes to numeric types before
you add the values.
Try something like this...
int a = Convert::ToInt32(textBox1->Text);
int b = Convert::ToInt32(textBox2->Text);
int c = a + b;
textBox3->Text = Convert::ToString(c);
--
Peter [MVP Visual Developer]
Jack of all trades, master of none.
.
- References:
- C++ .Net Simple Math Calculation
- From: Ronin
- C++ .Net Simple Math Calculation
- Prev by Date: C++ .Net Simple Math Calculation
- Next by Date: internet connection
- Previous by thread: C++ .Net Simple Math Calculation
- Next by thread: internet connection
- Index(es):
Relevant Pages
|