Date: Fri, 5 Feb 1999 13:54:03 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: "Alton, Matthew" <Matthew.Alton@anheuser-busch.com> Cc: "'Hackers@FreeBSD.ORG'" <Hackers@FreeBSD.ORG> Subject: Re: C headers Message-ID: <199902052154.NAA99560@apollo.backplane.com> References: <31B3F0BF1C40D11192A700805FD48BF90177670F@STLABCEXG011>
next in thread | previous in thread | raw e-mail | index | archive | help
Try compiling with -Wall to turn on warnings and see what happens. cc -Wall x.c -o x -Matt Matthew Dillon <dillon@backplane.com> :Why does printf() non need #include <stdio.h> like the man page says? : :-------------------------------------- foo.c :int :mean(int a, int b) :{ : return (a + b) / 2; :} : :int :main() :{ : int i = 0, j = 0, answer = 0; : : i = 7; : j = 9; : : answer = mean(i, j); : printf("The mean of %d and %d is %d\n", i, j, answer); : : return 0; :} :---------------------------------------------- : :builds without a #include <stdio.h>. A student asked me why and I can't explain :this inconsistency. : : :Matthew Alton :Computer Services - UNIX Systems Administration :(314)632-6644 matthew.alton@anheuser-busch.com : alton@plantnet.com : : :To Unsubscribe: send mail to majordomo@FreeBSD.org :with "unsubscribe freebsd-hackers" in the body of the message : To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902052154.NAA99560>