🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3765

Re: What happens when ...

#3765
From: Danzer
Date: Mon, 08 May 2006 20:04
30 lines
1698 bytes
> The other question is about structure that declares a member of
> it's own type within it's definition. For example:
> 
>     struct TSomeStruct
>     {
>         ....
>         TSomeStruct *x;
>         TSomeStruct *y;
>     };
> 
> This compiles without warnings or errors but I would expect it
> not to because it looks to me like it's an incomplete data type
> when it hits x & y.
> 
> ~ JD
> 

This structure declaration would be necessary to create a doubly-linked 
list.  More meaning variable name would be

struct TListObject
{
   ...
   TListObject *PrevListObject; // At the head of the list this is NULL.
   TListObject *NextListObject; // At the tail of the list this is NULL.
};

It has been a long time since I've used such a structure.

Danzer
Technical Details
Message-ID: <445fa574$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <445cbd5d$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,2f21d80b956d055f
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 08 May 2006 15:04:45 -0500
From: Danzer <danzer@REMOVEknology.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060404 SeaMonkey/1.0.1
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: What happens when ...
References: <445cbd5d$1@newsgroups.borland.com>
In-Reply-To: <445cbd5d$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.1.54.190
Message-ID: <445fa574$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1147118964 69.1.54.190 (8 May 2006 13:09:24 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail