gstream-operator (3) Linux Manual 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;in conjuction with the standard stream system. And, by the way, consequently also in conjuction with a gstream:
cout << a_number;
cin >> a_number;
gstream gs;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.
gs << a_number;
gs >> a_number;
