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 value | opening 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.