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:
Add the following code to the button:
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:
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