[DUG] StrCopy problem
Jan Bakuwel
jan.bakuwel at omiha.com
Sun May 12 10:07:39 NZST 2013
Hi Ross,
On 12/05/13 02:38, Ross Levis wrote:
>
> var
>
> a: pChar;
>
> b: pChar;
>
> begin
>
> a := 'abcdefghi';
>
> b := 'jklmnopqr';
>
> StrCopy(a,b);
>
> end;
>
>
>
> Question: Why does this code crash?
>
A PChar is a pointer. You need to allocate memory to hold the data.
cheers,
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20130512/aa521f6f/attachment.html
More information about the Delphi
mailing list