Avoid functions with unspecified arguments (...)

C++ allows you to declare functions that take unspecified numbers and types of arguments. The classic example is:

    void printf(char *, ...);
This leftover feature from C subverts quality programming. There are very few functions that need an interface like this; use default arguments or function overloading instead.

[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