Lecture 5 Review
- How do we allow a non-member function access to private member
members of a class?
- Suppose a member function foo of class C accepts an object reference of class C as an argument. Does foo have access to the member variables of the argument class C object? ( C::foo(C& C1){...} )
- What do we call the object that is used to invoke a member function such as foo?
- Suppose we declared foo as follows:
C::foo(C& C1) const
{...}
What restrictions apply with the use of const (assuming const is also in foo's declaration)?
- Define conversion constructor.
- Whats the difference between explicit and implicit calls to a conversion constructor and how can we prevent implicit calls?
- What is a destructor, what does it look like and when is it automatically called?