prototype my function, please

Tim McDaniel mcdaniel at amara.uucp
Tue Jun 12 01:44:12 AEST 1990


cknight at polyslo.CalPoly.EDU (King Claudius) suggests:
   An easier way to do this is to declare main as returning void...

No, you can't.

To repeat what was just said a few weeks ago: the ANSI C standard says
that main may be defined in one of two ways, in a non-standalone-
program environment:
	int main(void) { /* ... */ }
or	int main(int argc, char *argv[]) { /* ... */ }
(Or, presumably, equivalent formulations.)  Section 2.1.2.2.1.
--
"I'm not a nerd -- I'm 'socially challenged'."

Tim McDaniel
Internet: mcdaniel at adi.com             UUCP: {uunet,sharkey}!puffer!mcdaniel



More information about the Comp.lang.c mailing list