From owner-freebsd-questions@FreeBSD.ORG Thu Oct 25 15:27:18 2007 Return-Path: Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E283A16A417 for ; Thu, 25 Oct 2007 15:27:18 +0000 (UTC) (envelope-from wmoran@potentialtech.com) Received: from mail.potentialtech.com (internet.potentialtech.com [66.167.251.6]) by mx1.freebsd.org (Postfix) with ESMTP id B9BF813C4C5 for ; Thu, 25 Oct 2007 15:27:18 +0000 (UTC) (envelope-from wmoran@potentialtech.com) Received: from vanquish.pitbpa0.priv.collaborativefusion.com (pr40.pitbpa0.pub.collaborativefusion.com [206.210.89.202]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.potentialtech.com (Postfix) with ESMTP id D9D82EBC3B; Thu, 25 Oct 2007 11:27:16 -0400 (EDT) Date: Thu, 25 Oct 2007 11:27:15 -0400 From: Bill Moran To: Oliver Fromme Message-Id: <20071025112715.baa0768f.wmoran@potentialtech.com> In-Reply-To: <200710251502.l9PF209C064013@lurza.secnetix.de> References: <200710232324.09851.h.schmalzbauer@omnisec.de> <200710251502.l9PF209C064013@lurza.secnetix.de> X-Mailer: Sylpheed 2.4.4 (GTK+ 2.10.14; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@FreeBSD.ORG, h.schmalzbauer@omnisec.de Subject: Re: Mentor for C self study wanted X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2007 15:27:19 -0000 In response to Oliver Fromme : > Harald Schmalzbauer wrote: > > > > #include > > > > void main() > > That's not a C program. :-) > > The return value of the main function of a valid C program > must be int. And of course, your main function should > end with "return 0;" or "exit(0);" (the latter requires > "#include " at the top). > > By the way, I recommend you get a copy of the C standard > and use it for reference. You can buy a digital copy (PDF) > at http://webstore.ansi.org/ (Search for "9899-1999"), > it's $30. Alternatively ask Google for "C99 draft" to get > a free copy of a draft of the standard, which isn't very > different from the final standard. > > You can also buy a hardcopy of the standard (i.e. a book), > but it was ~ $300 last time I looked. If we're recommending books, I can't say enough good things about the Kernighan and Richie C book: http://www.amazon.com/C-Programming-Language-2nd/dp/0131103628/ref=pd_bbs_2/105-1904293-7155604?ie=UTF8&s=books&qid=1193326006&sr=1-2 -- Bill Moran http://www.potentialtech.com