<<< Function default parameters | Index | Dynamic memory allocation >>> |
Early C++ allowed default args in function definitions:
// declaration
void print( int value, int base = 10 );
// definition
void print( int value, int base = 10 )
{
//...
}
Today's ISO C++ no longer permits it, so use:
// declaration void print( int value, int base = 10 ); // definition void print( int value, int base /* = 10 */ ) { //... }
<<< Function default parameters | Index | Dynamic memory allocation >>> |