SUMMARY
  • Qualifiers auto and register are allowed only to local variables of a function.
  • If we define the function ahead of its use, there is no need of function prototype.
  • In C++, if a function returns a reference a function call can occur even on the left hand side of an assignment operator.
  • Directive “inline” is only a request to the compiler. Compiler is free to ignore it so desires.
  • Never return a reference, which is an alias of a local variable.
  • The number of arguments passed must be same as the number of explicitly described parameters. The exceptions being functions with default parameters and functions with ellipsis.
  • The order of evaluation of arguments is unspecified.
  • Overloaded functions must have different parameter list (signature). ...

Get Object Oriented Programming with C++, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.