Include function prototypes

Omit dummy parameter names in function declarations only if the meaning is clear without them. It's almost always necessary to include parameter names when you have more than one parameter of the same type; otherwise it's impossible to figure out which one is which.

If you are getting compiler warnings such as "warning: foo not used" where foo is a parameter of a function, stop the warning by leaving the parameter name out of the function header for the function's definition (you can include the parameter name inside a /* */ comment). Whether or not a parameter name appears in the function's declaration has no bearing on the warning.

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker