From owner-freebsd-questions@FreeBSD.ORG Thu Oct 25 15:02:08 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 A394016A41A for ; Thu, 25 Oct 2007 15:02:08 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2001:1b20:1:3::1]) by mx1.freebsd.org (Postfix) with ESMTP id 36D8B13C4C3 for ; Thu, 25 Oct 2007 15:02:08 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.1/8.14.1) with ESMTP id l9PF20c9064014; Thu, 25 Oct 2007 17:02:06 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.1/8.14.1/Submit) id l9PF209C064013; Thu, 25 Oct 2007 17:02:00 +0200 (CEST) (envelope-from olli) Date: Thu, 25 Oct 2007 17:02:00 +0200 (CEST) Message-Id: <200710251502.l9PF209C064013@lurza.secnetix.de> From: Oliver Fromme To: freebsd-questions@FreeBSD.ORG, h.schmalzbauer@omnisec.de In-Reply-To: <200710232324.09851.h.schmalzbauer@omnisec.de> X-Newsgroups: list.freebsd-questions User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.2-STABLE-20070808 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 25 Oct 2007 17:02:06 +0200 (CEST) Cc: 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:02:08 -0000 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. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "When your hammer is C++, everything begins to look like a thumb." -- Steve Haflich, in comp.lang.c++