For Advanced Readers
  1. There are many rules and points to be noted about functions. However, these cannot be discussed at this stage. They are just listed for reference.

    • In C++, a function can return a variable of type reference. If a function returns by reference, a function call can occur even on the left hand side of an assignment operator.
    • Never return a reference, which is an alias of a local variable.
    • Directive “inline” is only a request to the compiler. Compiler is free to ignore it so desires.
    • The order of evaluation of arguments is unspecified.
  2. In C++, a local variable of a function can be declared as static. (This is not allowed in Java.) Such variables retain their values after the execution of that function is over. This has ...

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.