std::ios_base::seekdir

typedef /*implementation defined*/ seekdir; static constexpr seekdir beg = /*implementation defined*/ static constexpr seekdir end = /*implementation defined*/ static constexpr seekdir cur = /*implementation defined*/ Specifies file seeking direction type. The following constants are defined: Constant Explanation beg the beginning of a stream end the ending of a stream cur the current position of stream position indicator Example

std::ios_base::register_callback

void register_callback( event_callback function, int index ); Registers a user-defined function which will be called by imbue(), std::basic_ios::copyfmt() and ~ios_base(). Every registered callback is called every time: the event type (a value of type event) is passed as its first argument, and may be used to distinguish between the callers. The callbacks are called in the reverse order of registration (in other words, register_callback() pushes a callback pair on the callback stack). I

std::ios_base::pword

void*& pword( int index ); First, allocates or resizes the private storage (dynamic array of void* or another indexable data structure) sufficiently to make index a valid index, then returns a reference to the void* element of the private storage with the index index. The reference may be invalidated by any operation on this ios_base object, including another call to pword(), but the stored values are retained, so that reading from pword(index) with the same index later will produce

std::ios_base::precision

streamsize precision() const; (1) streamsize precision( streamsize new_precision ); (2) Manages the precision (i.e. how many digits are generated) of certain numeric output conversions. 1) Returns the current precision. 2) Sets the precision to the given one. Parameters new_precision - new precision setting Return value the precision before the call to the function. Example #include <iostream> int main() { const double d = 1.2345678901234; std::cou

std::ios_base::openmode

typedef /*implementation defined*/ openmode; static constexpr openmode app = /*implementation defined*/ static constexpr openmode binary = /*implementation defined*/ static constexpr openmode in = /*implementation defined*/ static constexpr openmode out = /*implementation defined*/ static constexpr openmode trunc = /*implementation defined*/ static constexpr openmode ate = /*implementation defined*/ Specifies available file open flags. It is a BitmaskType, the following constants

std::ios_base::iword

long& iword( int index ); First, allocates or resizes the private storage (dynamic array of long or another indexable data structure) sufficiently to make index a valid index, then returns a reference to the long element of the private storage with the index index. The reference may be invalidated by any operation on this ios_base object, including another call to iword(), but the stored values are retained, so that reading from iword(index) with the same index later will produce th

std::ios_base::ios_base

(1) private: ios_base( const ios_base& ); (until C++11) public: ios_base( const ios_base& ) = delete; (since C++11) protected: ios_base(); (2) 1) The copy constuctor is deleted: streams are not copyable. 2) The default constructor is protected: only derived classes may construct std::ios_base. The internal state is undefined after the construction. The derived class must call basic_ios::init() to complete initialization before first use or before destructor, otherwis

std::ios_base::iostate

typedef /*implementation defined*/ iostate; static constexpr iostate goodbit = 0; static constexpr iostate badbit = /*implementation defined*/ static constexpr iostate failbit = /*implementation defined*/ static constexpr iostate eofbit = /*implementation defined*/ Specifies stream state flags. It is a BitmaskType, the following constants are defined: Constant Explanation goodbit no error badbit irrecoverable stream error failbit input/output operation failed

std::ios_base::Init

class Init; This class is used to ensure that the default C++ streams (std::cin, std::cout, etc.) are properly initialized and destructed. The class tracks how many instances of it are created and initializes the C++ streams when the first instance is constructed as well as flushes the output streams when the last instance is destructed. The header <iostream> declares (directly or indirectly) an instance of std::ios_base::Init with static storage duration, whose definition is prov

std::ios_base::imbue

std::locale imbue( const std::locale& loc ); Sets the associated locale of the stream to the given one. Before returning, each function, registered by register_callback() is called with imbue_event as a parameter. Parameters loc - new locale to associate the stream to Return value The locale object, associated with the stream before the operation. Example See also getloc returns current locale (public member function)