Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2008 Jan : Get record to reference itself?

www.cryer.info
Managed Newsgroup Archive

Get record to reference itself?

Subject:Get record to reference itself?
Posted by:"Mark Smith" (marksmi..@jungle-monkey.com)
Date:Wed, 23 Jan 2008 00:17:26

Hi,

I am new to Delphi and trying to implement a simple binary tree, but
it's not really working:

   Entry = Record
     firstname : string[30];
     surname : string[30];
     age: byte;
     left: ^Entry;
     right: ^Entry;
   end;

E2086 Type 'Entry' is not yet completely defined

It seems weird that I can't have a pointer to another record of the same
type.

What am I doing wrong?

Thanks

Replies:

www.cryer.info
Managed Newsgroup Archive