std::ios_base::openmode - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::ios_base::openmode

From cppreference.com
< cpp‎ | io‎ | ios base

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 are defined:

Constant | Explanation
`app` | seek to the end of stream before each write
`binary` | open in binary mode
`in` | open for reading
`out` | open for writing
`trunc` | discard the contents of the stream when opening
`ate` | seek to the end of stream immediately after open

### [edit] Example

| This section is incomplete Reason: no example

### [edit] See also

open | opens a file and configures it as the associated character sequence (public member function of `std::basic_filebuf`) [edit]
(constructor) | constructs a basic_stringbuf object (public member function of `std::basic_stringbuf`) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/io/ios_base/openmode&oldid=57878"
Category:

- Todo no example