[OCLUG-devel] Single Element Structures

Chris Berry chris_berry-list-oclug-devel at jm-associates.com
Fri Sep 2 14:24:28 PDT 2005


Just off the top of my head, you may want to do some research into 
linked lists, however I'm not so great at them myself so that's about as 
much help as I can offer.

Chris Berry
chris_berry at jm-associates.com
Information Advisory Manager
JM Associates

“If you have a strong enough why you can bear almost any how.” --Nietzsche

Doug Jolley wrote:
> Hi --
> 
> I am a real newbie to C and in way over my head on a project that I'd really 
> like to get to work. I'm thinking that the thing to do may be to try to get 
> some help at the next OCLUG meeting; but, in the meantime I'm going to try 
> to muddle along as best I can.
> 
> To continue my muddling, I have encountered the following type definition:
> 
> typedef struct {
> node* head;
> } llist;
> 
> My question is: Why would anyone go to the trouble of defining a structure 
> with only one element in it? I thought the essence of structures was that 
> they contained a collection of dissimilar data elements. I'm sure the guy 
> that did this had a very good reason and I realize that I'm asking a 
> question without giving a lot of context; so, from what I've given there may 
> be no answer. Anyway, if an answer may be deduced from what I've given, I'd 
> love to hear it. Thanks for any input.
> 
> ... doug
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> OCLUG-devel mailing list -- OCLUG-devel at oclug.org
> http://mailman.oclug.org/mailman/listinfo/oclug-devel


More information about the OCLUG-devel mailing list