1. Because ostream is used in the signature, the function applies only to streams with the character
type char. If the function is intended only for use in Western Europe or in North America, this
is no problem. On the other hand, a more general version requires only a little extra work, so it
should at least be considered.
2. Another problem arises if a field width is set. In this case, the result is probably not what might
be expected. The field width applies to the immediately following write; in this case, to the
numerator. Thus, the statements