本文整理自网络,侵删。
procedure TForm1.Btnx_1Click(Sender: TObject);var StrxA:string; PStrA:PChar;begin StrxA:='330226198501017036'; Application.MessageBox(PChar(StrxA),''); GetMem(PStrA,100); StrCopy(PStrA,PChar(StrxA)); Application.MessageBox(PStrA,'');end;
procedure TForm1.Btnx_2Click(Sender: TObject);const P1: PChar = 'CodeGear'; P2: PChar = 'Delphi';var S: array[0..15] of Char;begin StrCopy(S, P1); StrCat(S, ' '); StrCat(S, P2); ShowMessage(StrPas(S)); {CodeGear Delphi} ShowMessage(S); {CodeGear Delphi}end;
相关阅读 >>
Delphi 采用 tidhttp 访问 https 的网站,采用 tidtcpclient 访问 https 的网站
Delphi -- gdi+ Delphi如何让 tgpimage 直接从流中加载图片
更多相关阅读请进入《Delphi》频道 >>