L
lsh998
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button2Click(Sender: TObject);
var
s1: string;
s2: string;
s3: string;
s4: string;
// m1 : TMemoryStream;
buffer : array of byte;
begin
s1:='123';
s2:='456';
setlength(buffer,6);
CopyMemory(@buffer[0], @s1[1], length(s1));
CopyMemory(@buffer[3], @s2[1], length(s2));
CopyMemory(@s3[1],@buffer[0],3);
CopyMemory(@s4[1],@buffer[3],3);
// showmessage(s3);
// showmessage(s4);
end;
请教:
当我单击 Button2 则出现地址错误的提示?
我哪里写错了啊?
谢谢!
var
s1: string;
s2: string;
s3: string;
s4: string;
// m1 : TMemoryStream;
buffer : array of byte;
begin
s1:='123';
s2:='456';
setlength(buffer,6);
CopyMemory(@buffer[0], @s1[1], length(s1));
CopyMemory(@buffer[3], @s2[1], length(s2));
CopyMemory(@s3[1],@buffer[0],3);
CopyMemory(@s4[1],@buffer[3],3);
// showmessage(s3);
// showmessage(s4);
end;
请教:
当我单击 Button2 则出现地址错误的提示?
我哪里写错了啊?
谢谢!