Date: Thu, 2 Oct 2003 09:04:22 -0700 From: Chris Pressey <cpressey@catseye.mine.nu> To: Bill Moran <wmoran@potentialtech.com> Cc: questions@freebsd.org Subject: Re: [OT] C question (typedef & structs) Message-ID: <20031002090422.0c93da41.cpressey@catseye.mine.nu> In-Reply-To: <3F7C4A3F.8000508@potentialtech.com> References: <3F7C4A3F.8000508@potentialtech.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 02 Oct 2003 11:54:39 -0400
Bill Moran <wmoran@potentialtech.com> wrote:
> Hey gang,
Hi Bill,
> Actually, 2 questions:
>
> 1) What's the difference between:
>
> struct customStruct {
> int RecID;
> char *Name;
> };
>
> and
>
> typedef struct customStruct {
> int RecID;
> char *Name;
> };
The latter is incomplete. Try
typedef struct customStruct {
int RecID;
char *Name;
} MyCustomStruct;
See also
http://www.phim.unibe.ch/comp_doc/c_manual/C/SYNTAX/typedef.html
-Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031002090422.0c93da41.cpressey>
