c++ programming language fundamentals
3. classes and operator overloading

class construction - operator overloading

V - [ vector class with OCCF and operator overloading ]

default values for default constructor
and operator[], operator+=, and operator+ are overloaded

[] can be used both in lhs and rhs.

+= is implemented as a member.

+ is implemented as a non-member function, so that, it is with two parameters. lhs is not mutable.
return type is object.

== is implemented as a friend function for value and size comparison.


basic facilities << | >> class derivation
dr. salih yurttas | computer science