pingu pingu - 3 years ago 98
C++ Question

Function Declaration Parameter Naming Best Practices (C++)

In a function declaration, while the parameters do not have to be named, is it preferable to have them named? What are the advantages and disadvantages of this?

sbi sbi
Answer Source

The advantage of naming them is that you can refer to them in the documentation. (This includes your editor/IDE picking them up and presenting them to you as hints when you type a call to such a function.)

A disadvantage would be that names might change according to the function's implementation, except for the fact that the names in a function declaration might differ from those in the function's definition. (IOW: I see no disadvantage.)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download