I
Ian
Consider that I have a "non-extern" function that takes no
parameters. Which of the following would be ANSI C90 compliant:
void hello(void)
{
printf("Hello\n");
}
or
void hello()
{
printf("Hello\n");
}
I always (and I mean always) use the former. I couldn't find any
mention of the correct method in the FAQ, but I remember reading
somewhere about only using 'void' as a parameter with functions
declared as 'extern' if you want to assure it accepts no parameters.
parameters. Which of the following would be ANSI C90 compliant:
void hello(void)
{
printf("Hello\n");
}
or
void hello()
{
printf("Hello\n");
}
I always (and I mean always) use the former. I couldn't find any
mention of the correct method in the FAQ, but I remember reading
somewhere about only using 'void' as a parameter with functions
declared as 'extern' if you want to assure it accepts no parameters.