gstream-operator(3)
| operator(3) | gstream manual | operator(3) |
NAME
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
in conjuction with the standard stream system. And, by the way, consequently also in conjuction with a gstream:
fix a_number = 0.3;
cout << a_number;
cin >> 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.
gstream gs;
gs << a_number;
gs >> a_number;
| version 1.6 | gstream |
