cplusplus.com cplusplus.com
cplusplus.com   C++ : Reference : IOstream Library : ios_base : openmode
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forum
Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
IOstream Library
manipulators
classes:
· filebuf
· fstream
· ifstream
· ios
· iostream
· ios_base
· istream
· istringstream
· ofstream
· ostream
· ostringstream
· streambuf
· stringbuf
· stringstream
objects:
· cerr
· cin
· clog
· cout
types:
· fpos
· streamoff
· streampos
· streamsize
ios_base
· ios_base::ios_base
· ios_base::~ios_base
member classes:
· ios_base::failure
· ios_base::Init
member functions:
· ios_base::flags
· ios_base::getloc
· ios_base::imbue
· ios_base::iword
· ios_base::precision
· ios_base::pword
· ios_base::register_call...
· ios_base::setf
· ios_base::sync_with_stdio
· ios_base::unsetf
· ios_base::width
· ios_base::xalloc
member types:
· ios_base::event
· ios_base::event_callback
· ios_base::fmtflags
· ios_base::iostate
· ios_base::openmode
· ios_base::seekdir

-

ios_base::openmode public member type

Type for stream opening mode flags

Bitmask type to represent stream opening mode flags.

A value of this type can be any valid combination of the following member constants:

flag valueopening mode
app(append) Set the stream's position indicator to the end of the stream before each output operation.
ate(at end) Set the stream's position indicator to the end of the stream on opening.
binary(binary) Consider stream as binary rather than text.
in(input) Allow input operations on the stream.
out(output) Allow output operations on the stream.
trunc(truncate) Any current content is discarded, assuming a length of zero on opening.

These constants are defined in the ios_base class as public members. Therefore, they can be refered to either directly by their name as ios_base members (like ios_base::in) or by using any of their inherited classes or instantiated objects, like for example ios::ate or cout.out.

© The C++ Resources Network, 2000-2007 - All rights reserved
Spotted an error? - contact us