Mail Archives: djgpp/1997/12/03/00:01:27
Nate Eldredge wrote:
>
[snip]
> void pix8(int x, int y, int c) { /* ... */}
> void pix24(int x, int y, int c) { /* ... */ }
> int main(void) /* main() must ALWAYS return int */
> {
> void (*pix_func)();
Wouldn't void (*pix_func)( int, int, int ); be a better type for this
variable? Constraining the argument types of function pointers can
prevent all sorts of nasty bugs.
--
---------------------------------------------------------------------
| John M. Aldrich | "Autocracy is based on the assumption|
| aka Fighteer I | that one man is wiser than a million |
| mailto:fighteer AT cs DOT com | men. Let's play that over again, |
| http://www.cs.com/fighteer | too. Who decides?" - Lazarus Long |
---------------------------------------------------------------------
- Raw text -