29 Input/output library [input.output]

29.10 File-based streams [file.streams]

29.10.2 Class template basic_­filebuf [filebuf]

29.10.2.4 Member functions [filebuf.members]

Table 130: File open modes [tab:filebuf.open.modes]
ios_­base flag combination
stdio equivalent
binary
in
out
trunc
app
+
"w"
+
+
"w"
+
+
"a"
+
"a"
+
"r"
+
+
"r+"
+
+
+
"w+"
+
+
+
"a+"
+
+
"a+"
+
+
"wb"
+
+
+
"wb"
+
+
+
"ab"
+
+
"ab"
+
+
"rb"
+
+
+
"r+b"
+
+
+
+
"w+b"
+
+
+
+
"a+b"
+
+
+
"a+b"