From owner-freebsd-hackers Fri Feb 5 13:58:02 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA08534 for freebsd-hackers-outgoing; Fri, 5 Feb 1999 13:54:08 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA08527 for ; Fri, 5 Feb 1999 13:54:06 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.2/8.9.1) id NAA99560; Fri, 5 Feb 1999 13:54:03 -0800 (PST) (envelope-from dillon) Date: Fri, 5 Feb 1999 13:54:03 -0800 (PST) From: Matthew Dillon Message-Id: <199902052154.NAA99560@apollo.backplane.com> To: "Alton, Matthew" Cc: "'Hackers@FreeBSD.ORG'" Subject: Re: C headers References: <31B3F0BF1C40D11192A700805FD48BF90177670F@STLABCEXG011> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Try compiling with -Wall to turn on warnings and see what happens. cc -Wall x.c -o x -Matt Matthew Dillon :Why does printf() non need #include 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 . 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