C++ .Net Simple Math Calc

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Are you trying to add together numbers from those textBoxes? Or are you
trying to concatenate the strings?

maybe:
textBox3->Text = String::Concat(textBox1->Text, textBox2->Text);

or maybe something like:
textBox3->Text = (Double::Parse(textBox1->Text) +
Double::Parse(textBox2->Text)).ToString();

In C++/CLI (coming in VS 2005), your line will concatenate the strings.
 
Thanks for the response James. Both are helpful to know... so any
calculation... have to convert and parse the characters? did not know that...
i'm mainly a VB programmer... but i want to know all language... taking it
one step at a time.

Thanks again... a million.
Ronin
 
Ronin said:
Thanks for the response James. Both are helpful to know... so any
calculation... have to convert and parse the characters? did not know
that...
i'm mainly a VB programmer... but i want to know all language... taking it
one step at a time.

Thanks again... a million.
Ronin
Ronin, you asked the same question in the academic newsgroup. Please check
there for additional responses.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top