L
loskiller
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button2Click(Sender: TObject);
var
x:TStringStream;
buf,buf1:array[0..3] of char;
begin
buf:='1234';
buf1:='4321';
x:=TStringStream.Create('5678');
x.Write(buf,sizeof(buf));
x.Read(buf1,sizeof(buf1));
showmessage(buf1);
end;
这时buf1的值应该是1234啊 怎么还是4321
var
x:TStringStream;
buf,buf1:array[0..3] of char;
begin
buf:='1234';
buf1:='4321';
x:=TStringStream.Create('5678');
x.Write(buf,sizeof(buf));
x.Read(buf1,sizeof(buf1));
showmessage(buf1);
end;
这时buf1的值应该是1234啊 怎么还是4321