gstream-operator man page

operator, operator

Synopsis

#include <gstream.h>

ostream& operator<<(ostream& o, fix const& x);

istream& operator>>(istream& i, fix& x);

Description

These two functions don't actually belong to the gstreams, they are here simply because they sometimes make the life a bit easier (without costing anything in executable size if they are left unused). Their purpose is to make the class fix capable of extracting/inserting with the notation

   fix a_number = 0.3;
   cout << a_number;
   cin >> a_number;

in conjuction with the standard stream system. And, by the way, consequently also in conjuction with a gstream:

   gstream gs;
   gs << a_number;
   gs >> a_number;

You are probably not interested in calling them with their function names, only with the <</>> operators, so this paragraph is written just to make you aware of the possibility of doing that.

Info

version 1.6 gstream manual