cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/11/21:48:34

From: Matthew Heyman <kay DOT heyman AT airmail DOT net>
Newsgroups: comp.os.msdos.djgpp,comp.graphics.algorithms
Subject: Re: struct problem... structs within struct
Date: Tue, 10 Aug 1999 18:24:58 +0000
Organization: Airnews.net! at Internet America
Lines: 25
Message-ID: <615620E39BE81788.CF8A6B1990FBBD97.C41A8FB435290DCC@lp.airnews.net>
X-Orig-Message-ID: <37B06E7A DOT 7C5F AT airmail DOT net>
References: <A7083B60FEDED7E0 DOT 7F2CBC07CD9B5AB8 DOT 019CE2E485CE12C4 AT lp DOT airnews DOT net> <37AF5947 DOT 66951F05 AT NOSPAMthepentagon DOT com> <8432818566957DB4 DOT DF5776918DB4D437 DOT AD3715803EC19E27 AT lp DOT airnews DOT net> <37B0847D DOT 60A75CAB AT NOSPAMthepentagon DOT com>
Abuse-Reports-To: abuse at airmail.net to report improper postings
NNTP-Proxy-Relay: library1.airnews.net
NNTP-Posting-Time: Tue Aug 10 18:25:17 1999
NNTP-Posting-Host: ![u#51k-W>kaX*W (Encoded at Airnews!)
Mime-Version: 1.0
X-Mailer: Mozilla 3.01C-KIT (Win95; U)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

All right....  digging through my code and came up with a possible
realization.   In several instinces I use structs within structs.  Is
this possible?  Consider the following piece of code...  

typedef struct 
{
int x;
}point;

typedef struct
{
point loc;
}vert;

point p1;
p1 = 2;
vert v1;
v1 = p1;
//and to access the final point within the vert
cout <<v1.loc.x<<endl;


Is my logic messed up?  Can I even do this in?  

Matthew Heyman

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019