CMPT 212
Fall 1997
|
sentence a; int i; float f; cout << i << a << f; // These two lines are ((cout << i) << a) << f; // the same.
istream& operator>>(istream& is, sentence& s) { ... return is; }
const myClass1& operator+(const myClass2& leftOp, const myClass3& rightOp); ... myClass1 a; myClass2 b; myClass3 c; ... a = b + c;
const myClass1& myClass2::operator+(const myClass3& rightOp); ... myClass1 a; myClass2 b; myClass3 c; ... a = b + c;
const myClass1& operator++(const myClass1& onlyOp); ... myClass1 a; ... ++a;
const myClass1& myClass1::operator++(); ... myClass1 a; ... ++a;
const myClass1& operator++(const myClass1& onlyOp, int i); ... myClass1 a; ... a++;
const myClass1& myClass1::operator++(int i); ... myClass1 a; ... a++;
class sentence { public: friend ostream& operator<<(ostream& os, const sentence& s); ... }; ostream& operator<<(ostream& os, const sentence& s) { ... }
class A { ... }; class B { public: friend class A; ... };
class A; class B { public: friend class A; ... }; class A { public: friend class B; ... };
Return to lecture notes index |
|
This page is maintained by simpson@cs.sfu.ca. | Last updated on 15 Oct 1997. |