std::basic_ofstream::open

Da cppreference.com.
< cpp‎ | io‎ | basic ofstream

 
 
Ingresso / libreria di output
I / O manipolatori
C-style I / O
Buffer
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf
basic_filebuf
basic_stringbuf
strstreambuf(deprecato)
Streams
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Astrazioni
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
File I / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream
basic_ofstream
basic_fstream
String I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_istringstream
basic_ostringstream
basic_stringstream
Array I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istrstream(deprecato)
ostrstream(deprecato)
strstream(deprecato)
Tipi
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streamoff
streamsize
fpos
Errore categoria interfaccia
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iostream_category(C++11)
io_errc(C++11)
 
std::basic_ofstream
Membri funzioni
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ofstream::basic_ofstream
basic_ofstream::operator=(C++11)
basic_ofstream::swap(C++11)
basic_ofstream::rdbuf
Operazioni sui file
Original:
File operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ofstream::is_open
basic_ofstream::open
basic_ofstream::close
Non membri funzioni
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ofstream::swap(std::basic_ofstream)(C++11)
 
void open(constchar*filename,
           ios_base::openmode mode = ios_base::out);
void open(conststd::string&filename,                                  
           ios_base::openmode mode = ios_base::out);
(dal C++11)
Apre e collaboratori file con il flusso di file. Chiede clear() in caso di successo o setstate(failbit) in caso di fallimento.
Original:
Opens and associates file with the file stream. Calls clear() on success or setstate(failbit) on failure.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
La prima versione chiama efficacemente rdbuf()->open(filename, mode | ios_base::out).
Original:
The first version effectively calls rdbuf()->open(filename, mode | ios_base::out).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
La seconda versione chiama efficacemente open(filename.c_str(), mode).
Original:
The second version effectively calls open(filename.c_str(), mode).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Indice

[modifica]Parametri

filename -
il nome del file da aprire
Original:
the name of the file to be opened
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
mode -
specifica modalità di apertura flusso. E 'tipo di maschera di bit, le seguenti costanti sono definite:
Constant
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation
app
cercano alla fine del flusso prima di ogni scrittura
Original:
seek to the end of stream before each write
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
binary
aperto in modalità binaria
Original:
open in binary mode
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
in
aprire per la lettura
Original:
open for reading
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
out
aperto per la scrittura
Original:
open for writing
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
trunc
scartare il contenuto del flusso durante l'apertura
Original:
discard the contents of the stream when opening
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ate
cercano di fine flusso subito dopo aperto
Original:
seek to the end of stream immediately after open
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Original:
specifies stream open mode. It is bitmask type, the following constants are defined:
Constant
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation
app
cercano alla fine del flusso prima di ogni scrittura
Original:
seek to the end of stream before each write
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
binary
aperto in modalità binaria
Original:
open in binary mode
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
in
aprire per la lettura
Original:
open for reading
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
out
aperto per la scrittura
Original:
open for writing
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
trunc
scartare il contenuto del flusso durante l'apertura
Original:
discard the contents of the stream when opening
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ate
cercano di fine flusso subito dopo aperto
Original:
seek to the end of stream immediately after open
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica]Valore di ritorno

(Nessuno)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica]Esempio

[modifica]Vedi anche

controlla se il flusso è associato un file
Original:
checks if the stream has an associated file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(metodo pubblico)[modifica]
chiude il file associato
Original:
closes the associated file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(metodo pubblico)[modifica]
close