一个数组指针的使用【二】
type ShopCat = record cid: Integer; parent_cid: Integer; name: string[30]; is_parent: boolean; end; PShopCat = ^ShopCat; TShopCat = Array of ShopCat; PTShopCat = ^TShopCat; procedure TForm1.Button1Click(Sender: TObject); var pcat: PTShopCat; i: Integer; begin GetMem(pcat,10*sizeof(TShopCat)); pcat^[0].name := 'opi'; ShowMessage(pcat^[0].name); FreeMem(Pcat); end; end.