## 17.5.1 Stream Output <<

- Output stream class (chptr. 12) provides ability to write a single character
- Stream library provides insertion operator for all built-in types:

  > `ostream& operator<<(ostream& out, double value);`

  Note: the stream itself is returned

- E.g.: Overload output for `Fraction`

  > `

  >     ostream& operator<<( ostream &out, const Fraction &value )
  >     {
  >        out << value.numerator() << "/" << value.denominator();
  >        return out;
  >     }

  > `

prev |top |next