istream File Reference

#include <ios>
#include <limits>
#include <bits/istream.tcc>

Include dependency graph for istream:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Namespaces

namespace  std

Classes

class  std::basic_istream< CharT, Traits >
 Controlling input. More...
class  std::basic_istream< CharT, Traits >::sentry
 Performs setup work for input streams. More...
class  std::basic_iostream< CharT, Traits >
 Merging istream and ostream capabilities. More...


Detailed Description

This is a Standard C++ Library header. You should #include this header in your programs, rather than any of the "st[dl]_*.h" implementation files.

Definition in file istream.


Function Documentation

template<class Traits>
basic_istream<char,Traits>& operator>> basic_istream< char, Traits > &  in,
signed char *  s
 

Character string extractors.

Parameters:
in An input stream.
s A pointer to a character array.
Returns:
in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a sentry object with good status, this function extracts up to n characters and stores them into the array starting at s. n is defined as:

  • if width() is greater than zero, n is width()
  • otherwise n is "the number of elements of the largest array of char_type that can store a terminating eos." [27.6.1.2.3]/6

Characters are extracted and stored until one of the following happens:

  • n-1 characters are stored
  • EOF is reached
  • the next character is whitespace according to the current locale
  • the next character is a null byte (i.e., charT() )

width(0) is then called for the input stream.

If no characters are extracted, sets failbit. Definition at line 691 of file istream.

template<class Traits>
basic_istream<char,Traits>& operator>> basic_istream< char, Traits > &  in,
unsigned char *  s
 

Character string extractors.

Parameters:
in An input stream.
s A pointer to a character array.
Returns:
in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a sentry object with good status, this function extracts up to n characters and stores them into the array starting at s. n is defined as:

  • if width() is greater than zero, n is width()
  • otherwise n is "the number of elements of the largest array of char_type that can store a terminating eos." [27.6.1.2.3]/6

Characters are extracted and stored until one of the following happens:

  • n-1 characters are stored
  • EOF is reached
  • the next character is whitespace according to the current locale
  • the next character is a null byte (i.e., charT() )

width(0) is then called for the input stream.

If no characters are extracted, sets failbit. Definition at line 686 of file istream.

template<class Traits>
basic_istream<char, Traits>& operator>> basic_istream< char, Traits > &  in,
signed char &  c
 

Character extractors.

Parameters:
in An input stream.
c A character reference.
Returns:
in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a sentry object with good status, this function extracts a character (if one is available) and stores it in c. Otherwise, sets failbit in the input stream. Definition at line 650 of file istream.

template<class Traits>
basic_istream<char, Traits>& operator>> basic_istream< char, Traits > &  in,
unsigned char &  c
 

Character extractors.

Parameters:
in An input stream.
c A character reference.
Returns:
in
Behaves like one of the formatted arithmetic extractors described in std::basic_istream. After constructing a sentry object with good status, this function extracts a character (if one is available) and stores it in c. Otherwise, sets failbit in the input stream. Definition at line 645 of file istream.


Generated on Wed Sep 8 10:20:26 2004 for libstdc++-v3 Source by doxygen 1.3.8