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>istream::ipfx</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
istream::ipfx

Usage

   #include <iostream.hpp>
   int istream::ipfx(int need = 0);

Description

   This function is provided to simplify the coding of extractors. It is
   responsible for error checking and propagation. If the error status is
   non- zero, ipfx returns zero immediately.

   Otherwise, if necessary, it does any flushing required by tie(). Flushing
   is required if the argument value is zero.

   Then if the ios::skipws format flag is set, and if need is zero,
   whitespace characters are extracted from the input stream until an end of
   file condition or a non-whitespace character is detected. If an error is
   detected during this process, ipfx sets the error state accordingly, and
   returns zero.

   Formatted input functions call ipfx with need == 0, and unformatted input

   functions call ipfx with need == 1.

Example 

   struct Pair {
       int a, b;
   };
   ostream &operator>>(ostream &s, Pair &p)
   {
       if (ipfx(0)) {
           // whatever is required
       }
       return s;
   }

Return Value

   The prefix function returns a non-zero int if the extraction can proceed,
   zero otherwise.






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