var
p1,p2,p3:Pchar;
begin
p1:=Pchar('This is ');
p2:=Pchar('a line');
p3:=p1+p2; <<--这个要怎么写,我想让p3='This is a line'end;
p1,p2,p3:Pchar;
begin
p1:=Pchar('This is ');
p2:=Pchar('a line');
p3:=p1+p2; <<--这个要怎么写,我想让p3='This is a line'end;
p1, p2, p3: Pchar;
begin
p1 := Pchar('This is ');
p2 := Pchar('a line');
GetMem(p3, Length(p1) + Length(p2) + 1);
StrCopy(p3, p1);
StrCat(p3, p2);
showmessage(string(p3));
//注意用完后释放
FreeMem(p3);end;