///请保证TList在TStringList前释放。 否则请用动态字符串数组来做中间的桥梁 var List:TList; B:TStrings; i:Integer; begin List:=TList.Create; B:=TStringList.Create; List.clear; B.Add('wr'); B.Add('wr960204'); for i:=0 to B.Count-1 do begin List.add(PChar(B[i])); end; showmessage(PChar(List[0])); List.free; B.free;
否则请用动态字符串数组来做中间的桥梁
var
List:TList;
B:TStrings;
i:Integer;
begin
List:=TList.Create;
B:=TStringList.Create;
List.clear;
B.Add('wr');
B.Add('wr960204');
for i:=0 to B.Count-1 do
begin
List.add(PChar(B[i]));
end;
showmessage(PChar(List[0]));
List.free;
B.free;
end;