Author: David Rasmussen
Date: 11:54:21 01/03/03
Go up one level in this thread
On January 02, 2003 at 19:56:17, Dann Corbit wrote: > >>I also got remark #310: old-style parameter list (anachronism) > >That's because it is a bug in your program. > >>I can fix that remark by having functions like >> >>void gen(void) and not void gen() but I do not see the importance of it >>because there is no problem with not declaring void. > >It is a serious error in a C program. For instance, if I declare a function >like this: > >int foo(); > >I can call it like this: > > i = foo(arg1, arg2, arg3, arg4); > >even though it has no arguments. An empty argument list in a function prototype >does not mean: "This function has no arguments." It actually means: "I may or >may not have arguments but I am not telling you what they are." > Exactly. Just one of the millions of small things that C++ fixes up on compared to C. Just using C++ as a better C, if nothing else, has many benefits. In this case, it's like: Why even have that "feature"? It only leads to bugs. /David
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.