[ Web Proxy ]
URL:
Viewing: https://ru.cppreference.com/cpp/io/basic_ofstream [Back]  [Original]

std::basic_ofstream cppreference.com
cppreference.com

std::basic_ofstream

cppreference.com
< cpp | io


<tbody> </tbody>
template< class CharT, class Traits = std::char_traits<CharT> > class basic_ofstream : public std::basic_ostream<CharT, Traits>
basic_ofstream . streambuffer (std::basic_filebuf) (std::basic_ostream).
:
The class template basic_ofstream implements high-level output operations on file based streams. It interfaces a file-based streambuffer (std::basic_filebuf) with the high-level interface of (std::basic_ostream).
Google.
. .
std::basic_ofstream , : std::basic_filebuf<CharT, Traits>.
:
A typical implementation of std::basic_ofstream holds only one non-derived data member: an instance of std::basic_filebuf<CharT, Traits>.
Google.
. .
:
:
Two specializations for common character types are also defined:
Google.
. .
<fstream>
Definition
ofstream basic_ofstream<char>
wofstream basic_ofstream<wchar_t>

-

char_type CharT[]
traits_type Traits[]
int_type Traits::int_type[]
pos_type Traits::pos_type[]
off_type Traits::off_type[]

-

:
constructs the file stream
Google.
. .

(public -) []
()
[virtual] ( )
basic_ofstream ,
(virtual public -) []
(C++11)
:
moves the file stream
Google.
. .

(public -) []
(C++11)

(public -) []
(raw)
:
returns the underlying raw file device object
Google.
. .

(public -) []
:
File operations
Google.
. .
,
(public -) []
:
opens a file and associates it with the stream
Google.
. .

(public -) []

(public -) []

,

std::swap
( ) []

std::basic_ostream

-

std::basic_ostream
(public - std::basic_ostream) []
:
inserts a character
Google.
. .

(public - std::basic_ostream) []

(public - std::basic_ostream) []

(public - std::basic_ostream) []

(public - std::basic_ostream) []
:
synchronizes with the underlying storage device
Google.
. .

(public - std::basic_ostream) []

-


(public std::basic_ostream) []

std::basic_ios

-

char_type CharT
traits_type Traits
int_type Traits::int_type
pos_type Traits::pos_type
off_type Traits::off_type
, .. /
(public - std::basic_ios) []
,
(public - std::basic_ios) []
,
(public - std::basic_ios) []
,
:
checks if a non-recoverable error has occurred
Google.
. .

(public - std::basic_ios) []
, ( fail())
(public - std::basic_ios) []
( !fail())
(public - std::basic_ios) []

(public - std::basic_ios) []

(public - std::basic_ios) []

(public - std::basic_ios) []

(public - std::basic_ios) []

(public - std::basic_ios) []

(public - std::basic_ios) []

(public - std::basic_ios) []

(public - std::basic_ios) []

(public - std::basic_ios) []

(public - std::basic_ios) []

(public - std::basic_ios) []

std::ios_base

-


(public - std::ios_base) []

(public - std::ios_base) []

(public - std::ios_base) []

(public - std::ios_base) []

(public - std::ios_base) []

(public - std::ios_base) []

(public - std::ios_base) []
[static]
, pword() iword()
(public static - std::ios_base) []
long
(public - std::ios_base) []
void*
(public - std::ios_base) []

(public - std::ios_base) []
, - C C++
(public static - std::ios_base) []

-

:
stream exception
Google.
. .

(public std::ios_base) []
:
initializes standard stream objects
Google.
. .

(public std::ios_base) []

- -

:

[]
app []
binary []
in []
out []
trunc []
ate []
noreplace (C++23) []

( ) []

:

[]
dec / (. std::dec)[]
oct / (. std::oct)[]
hex / (. std::hex)[]
basefield dec | oct | hex. []
left ( (. std::right))[]
right ( (. std::left))[]
internal ( (. std::internal))[]
adjustfield left | right | internal. []
scientific , , fixed (. std::scientific)[]
fixed , , scientific (. std::fixed)[]
floatfield scientific | fixed. []
boolalpha bool - (. std::boolalpha)[]
showbase , , , / (. std::showbase)[]
showpoint (. std::showpoint)[]
showpos + (. std::showpos)[]
skipws (. std::skipws)[]
unitbuf (. std::unitbuf)[]
uppercase / (. std::uppercase)[]

( ) []

:

[]
goodbit []
badbit []
failbit / ( )[]
eofbit []

( ) []

:

[]
beg []
end []
cur []

( ) []

() []

( ) []

Web Proxy Viewer  |  New URL  |  Original Page