/*
StrCopy, StrCat example
The following example uses an edit control, a label, and a button on a form. When the button is clicked, the label’s caption and the edit control’s text are combined in a buffer. Then the buffer is displayed in the label’s caption.
*/ 
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  char* szBuffer = new char[Label1->Caption.Length() + Edit1->Text.Length() + 1];
  // The following 2 lines are used in VCL applications
  StrCopy(szBuffer, Label1->Caption.c_str());
  StrCat(szBuffer, Edit1->Text.c_str());
  // The following 2 lines are used in CLX applications
  // StrCopy(szBuffer, WideCharToString(Label1->Caption.c_bstr()).c_str());
  // StrCat(szBuffer, WideCharToString(Edit1->Text.c_bstr()).c_str());
  Label1->Caption = szBuffer;
  Edit1->Clear();
  delete [] szBuffer;
} 
