S
star123456
Unregistered / Unconfirmed
GUEST, unregistred user!
我想把一个Char数组的值赋给一个string,不想用循环,可是如下代码老是出错,为什么?
procedure TForm1.Button1Click(Sender: TObject);
var
S: string;
Buffer1: array[0..255] of char;
begin
FillChar(Buffer1, 100, 77);
SetLength(S, 101);
Move(Buffer1, S, 100);
ShowMessage(s);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
S: string;
Buffer1: array[0..255] of char;
begin
FillChar(Buffer1, 100, 77);
SetLength(S, 101);
Move(Buffer1, S, 100);
ShowMessage(s);
end;