Mentor for C self study wanted
Oliver Fromme
olli at lurza.secnetix.de
Thu Oct 25 08:02:08 PDT 2007
Harald Schmalzbauer wrote:
>
> #include <stdio.h>
>
> 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 <stdlib.h>" 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++
More information about the freebsd-questions
mailing list