27 Input/output library [input.output]

27.5 Iostreams base classes [iostreams.base]

27.5.3 Class ios_base [ios.base]

27.5.3.1 Types [ios.types]

27.5.3.1.4 Type ios_base::openmode [ios::openmode]

typedef T3 openmode;

The type openmode is a bitmask type ([bitmask.types]). It contains the elements indicated in Table [tab:iostreams.openmode.effects].

Table 125openmode effects
ElementEffect(s) if set
app seek to end before each write
ate open and seek to end immediately after opening
binary perform input and output in binary mode (as opposed to text mode)
in open for input
out open for output
trunc truncate an existing stream when opening