Hey everyone,
I'm getting a strange AV. Don't really know why it's popping up.
This should go fine. I just set the Str which is actually a special kind of pointer, to point to 'test'.Code:type PMyRec = ^TMyRec; TMyRec = record Str: String; Int: Integer; end; procedure TForm1.Button5Click(Sender: TObject); var P: PMyRec; begin GetMem(P, sizeof(TMyRec)); P^.Str := 'test'; //<< AV HERE! P^.Int := 5; FreeMem(P); end;
Can somebody enlighten me?
Thanks
Bookmarks