Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: Indefinite-length array as member of struct:  how?
Message-ID: <1989Jul9.042714.28294@utzoo.uucp>
Organization: U of Toronto Zoology
References: <7360@c3pe.UUCP> <1989Jul7.155055.18983@utzoo.uucp> <2831@nmtsun.nmt.edu>
Date: Sun, 9 Jul 89 04:27:14 GMT

In article <2831@nmtsun.nmt.edu> dwho@nmtsun.nmt.edu (David Olix) writes:
>>	char	string[];
>>} *nodeptr;
>>
>>If you want to shut your compiler up, try making that "[1]".
>
>I guess I am unclear on something here.  If you define string as
>'char string[1];', that only gives you one char's worth of space in string.
>If that's the case why don't you define string as 'char string;'?

Because then nodeptr->string gives you a value of type char, not char *.
It's a convenience issue.
-- 
$10 million equals 18 PM       |     Henry Spencer at U of Toronto Zoology
(Pentagon-Minutes). -Tom Neff  | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
