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

Usage

   #include <iostream.hpp>
   istream &istream::ignore(int n, int delim = EOF);

Description

   The ignore function causes characters to be taken from the input and
   wasted, until n characters have been wasted, or until a character
   matching delim is extracted, or until an end of file condition is
   encountered. If the default value for delim (EOF) is used, ignore will
   stop  only when n characters have been wasted, or end of file is reached.

Example 

   // Input stream "abcdefghijk\n"

   char buffer[80];

   if (!cin.ignore(80,'h')) {  // end of file

   } else {
       cin >> buffer;
       cout << buffer; // output is "ijk"
   }

Return Value

   Returns a reference to the istream object for which it was called.





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