13,825
社区成员
发帖
与我相关
我的任务
分享
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Label1->Caption = Edit1->Text;
AnsiString str;
char *str1;
String str2;
str = Edit1->Text;
str1 = Edit1->Text.t_str();
Label2->Caption = str1;
str2 = str1;
Label3->Caption = str2;
}
Label2->Caption = str1;
#include <TCHAR.h>
#include <stdio.h>
TCHAR c[20];
String s="你好";
_tcscpy(c,s.t_str()); //_tcscpy()
char c1[20];
AnsiString s1="1234";
strcpy(c1,s1.c_str()); //strcpy()
char c2[100];
AnsiString s3 = "Hello World!";
sprintf(c2,"%s", s3.c_str());//printf()