From owner-freebsd-questions@FreeBSD.ORG Thu Oct 2 09:37:03 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9642316A4B3 for ; Thu, 2 Oct 2003 09:37:03 -0700 (PDT) Received: from mta1.adelphia.net (mta1.adelphia.net [68.168.78.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E12F43FE3 for ; Thu, 2 Oct 2003 09:37:02 -0700 (PDT) (envelope-from wmoran@potentialtech.com) Received: from potentialtech.com ([24.53.179.151]) by mta1.adelphia.net (InterMail vM.5.01.05.32 201-253-122-126-132-20030307) with ESMTP id <20031002164121.ZEKS25767.mta1.adelphia.net@potentialtech.com>; Thu, 2 Oct 2003 12:41:21 -0400 Message-ID: <3F7C542D.8070206@potentialtech.com> Date: Thu, 02 Oct 2003 12:37:01 -0400 From: Bill Moran User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030429 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Chris Pressey References: <3F7C4A3F.8000508@potentialtech.com> <20031002090422.0c93da41.cpressey@catseye.mine.nu> In-Reply-To: <20031002090422.0c93da41.cpressey@catseye.mine.nu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: questions@freebsd.org Subject: Re: [OT] C question (typedef & structs) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2003 16:37:03 -0000 Chris Pressey wrote: > On Thu, 02 Oct 2003 11:54:39 -0400 > Bill Moran 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 Thanks, Chris. That reference is fantastic. It's exactly what I've been looking for. I kept coming across over-simplified explanations of C when I searched. -- Bill Moran Potential Technologies http://www.potentialtech.com