Sunday, December 18, 2011

7-Tutorial 7: Concatenating Strings Together in the Windows C++ Environment using Visual C++.NET 2010, 2008

Tutorial 7: Concatenating Strings Together in the Windows C++ Environment using Visual C++.NET 2010, 2008:
        This program will show how to put two strings together to create a combination of the two. This called concatenation. Click here for the source code to the Concatenating Program in Visual C++.NET for the 2010 version or click here to download the 2008 version. Below the button is a label with its autosize property set to false. Make your form look something like this:   
Concatenating strings in Visual Microsoft Programs
Add the following code to the button:
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
       {
         String ^strCat;
         String ^something=textBox1->Text;
         String ^somethingElse=textBox2->Text;
         strCat=something+" "+somethingElse;
         label3->Text=strCat;
       }

0 comments:

Post a Comment