Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/io/ios base/openmode"

From cppreference.com
< cpp‎ | io‎ | ios base
(Undo revision 90752 by 113.88.81.69 (talk))
m (Text replace - "{{concept" to "{{named req")
Line 15: Line 15:
 
{{dcl end}}
 
{{dcl end}}
  
Specifies available file open flags. It is a {{concept|BitmaskType}}, the following constants are defined:  
+
Specifies available file open flags. It is a {{named req|BitmaskType}}, the following constants are defined:  
 
{{cpp/io/ios_base/openmode consts}}
 
{{cpp/io/ios_base/openmode consts}}
  

Revision as of 14:27, 15 June 2018

 
 
 
 
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
noreplace (C++23) open in exclusive mode

Example

See also

opens a file and configures it as the associated character sequence
(public member function of std::basic_filebuf<CharT,Traits>) [edit]
constructs a basic_stringbuf object
(public member function of std::basic_stringbuf<CharT,Traits,Allocator>) [edit]