COSC-051 Lecture Notes - Lecture 12: Include Directive, Operand
Document Summary
When const appears in the parameter list, the function is prevented from modifying the parameter. When const follows the parameter list, the function is prevented from modifying the object. The left operand of the overloaded binary operator is th calling object. The implicit left parameter is accessed through the this pointer. An overloaded operator can be invoked as a member function: It can also be invoked in the more conventional manner: Opclass a, b, s; s = a + b; If frcalass is a friend of aclass, then all member functions of frclass have unrestricted access to all members of aclass, including the private members. Place the class declaration in a header file that serves as the class specification file. Place the member function definitions in a class implementation file. Name the file classname. cpp (for example, square. cpp) this file should #include the class specification file.