Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>ostream::opfx</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
ostream::opfx
ostream::osfx

Usage

   #include <iostream.hpp>
   int ostream::opfx();
   void ostream::osfx();

Description

   These functions are provided to simplify the coding of inserters. They
   are responsible for error checking and propagation. The prefix function
   does any flushing required by tie(), and the suffix function does that
   required if either of ios::unitbuf or ios::stdio are set. The suffix
   function restores the default value (0) for width() unless
   ios::stickywidth is set, and inserts a space character into the output
   stream if ios::spacing is set, except in the case of the endl
   manipulator.

Example 

   struct Pair {
       int a, b;
   };
   ostream &operator<<(ostream &s, const Pair &p)
   {
       if (opfx())
           s << '(' << p.a << ':' << p.b << ')';

       osfx();
       return s;
   }

Return Value

   The prefix function returns a non-zero int if translation can proceed,
   zero otherwise. The suffix function has no return value.





Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson