Namensräume
Varianten

C-style file input/output

Aus cppreference.com
< cpp‎ | io


 
 
Input / Output-Bibliothek
I / O-Manipulatoren
C-style I / O
Puffern
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(veraltet)
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.
Abstraktionen
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
Datei-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(veraltet)
ostrstream(veraltet)
strstream(veraltet)
Types
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
Fehler Kategorie Schnittstelle
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)
 
C-style I / O
Funktionen
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Dateizugriff
Original:
File access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Direkte Eingabe / Ausgabe
Original:
Direct input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
fread
fwrite
Unformatierte Eingang / Ausgang
Original:
Unformatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Formatierte Eingabe / Ausgabe
Original:
Formatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Datei Positionierung
Original:
File positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ftell
fgetpos
fseek
fsetpos
rewind
Fehlerbehandlung
Original:
Error handling
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
clearerr
feof
ferror
perror
Operationen auf Dateien
Original:
Operations on files
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
remove
rename
tmpfile
tmpnam
 
Die CI / O Teilmenge der C + +-Standard-Bibliothek implementiert C-style-Stream Input / Output-Operationen. Die <cstdio> Header bietet generische Dateioperation Unterstützung und Versorgung Funktionen mit schmalen und Multibyte-Zeichen Input / Output-Funktionen und die <cwchar> Header bietet Funktionen mit Wide-Character Input / Output-Funktionen .
Original:
The C I/O subset of the C++ standard library implements C-style stream input/output operations. The <cstdio> header provides generic file operation support and supplies functions with narrow and multibyte character input/output capabilities, and the <cwchar> header provides functions with wide character input/output capabilities.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
C-Streams sind Objekte vom Typ std::FILE, die nur abgerufen und durch Pointer vom Typ std::FILE* (Hinweis manipuliert werden kann: Während es möglich sein kann, um eine lokale Objekt vom Typ std::FILE durch Dereferenzierung und Kopieren eines gültigen FILE* erstellen, indem Sie die Adresse einer solchen Kopie in die I / O-Funktionen ist undefiniertes Verhalten). Jede C-Strom wird mit einem externen physikalischen Gerät (Datei, Standardeingabestream, Drucker, seriellen Port, usw.) zugeordnet .
Original:
C streams are objects of type std::FILE that can only be accessed and manipulated through pointers of type std::FILE* (Note: while it may be possible to create a local object of type std::FILE by dereferencing and copying a valid FILE*, using the address of such copy in the I/O functions is undefined behavior). Each C stream is associated with an external physical device (file, standard input stream, printer, serial port, etc).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
C-Streams können sowohl für unformatierte und formatierte Ein-und Ausgang genutzt werden. Sie sind locale-empfindlich und können breit / Multibyte Konvertierungen wie nötig durchzuführen. Im Gegensatz zu C + +-Streams, wo jeder Strom mit eigenen locale verbunden ist, Zugriff auf alle C-Streams die gleiche locale Objekt: dem zuletzt installiert mit std::setlocale .
Original:
C streams can be used for both unformatted and formatted input and output. They are locale-sensitive and may perform wide/multibyte conversions as necessary. Unlike C++ streams, where each stream is associated with its own locale, all C streams access the same locale object: the one most recently installed with std::setlocale.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Neben dem System-spezifischen Informationen, die auf das Gerät zugreifen (zB POSIX file descriptor) hält jeder C-Stream-Objekt die folgenden:
Original:
Besides the system-specific information necessary to access the device (e.g. a POSIX file descriptor), each C stream object holds the following:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Zeichenbreite: schmal oder breit
Original:
Character width: narrow or wide
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Pufferung Zustand: unbuffered, Line-gepuffert, Fully Buffered .
Original:
Buffering state: unbuffered, line-buffered, fully buffered.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
Der Puffer, der durch einen externen, von Benutzern bereitgestellte Puffer ersetzt werden können .
Original:
The buffer, which may be replaced by an external, user-provided buffer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
I / O-Modus: Eingangs-, Ausgangs-oder update (Eingang und Ausgang) .
Original:
I/O mode: input, output, or update (both input and output).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5)
Binär / Text-Modus-Anzeige .
Original:
Binary/text mode indicator.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
6)
End-of-file Statusanzeige .
Original:
End-of-file status indicator.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
7)
Fehler Statusanzeige .
Original:
Error status indicator.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
8)
Dateipositionszeigers (ein Objekt vom Typ std::fpos_t), die, für breite Zeichenströme, umfasst die Parse-Zustand (ein Objekt vom Typ mbstate_t) .
Original:
File position indicator (an object of type std::fpos_t), which, for wide character streams, includes the parse state (an object of type mbstate_t).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten]Funktionen

Dateizugriff
Original:
File access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
öffnet eine Datei
Original:
opens a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Öffnen einer vorhandenen Stream mit einem anderen Namen
Original:
open an existing stream with a different name
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
schließt eine Datei
Original:
closes a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
synchronisiert einen Ausgabe-Stream mit der eigentlichen Datei
Original:
synchronizes an output stream with the actual file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
schaltet ein Datei-Stream zwischen wide character I / O und engen Charakter I / O
Original:
switches a file stream between wide character I/O and narrow character I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
setzt den Puffer für einen Datei-Stream
Original:
sets the buffer for a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
setzt den Puffer und dessen Größe für eine Datei-Stream
Original:
sets the buffer and its size for a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Direkte Eingabe / Ausgabe
Original:
Direct input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
liest aus einer Datei
Original:
reads from a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
eine Datei schreibt
Original:
writes to a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Unformatierte Eingang / Ausgang
Original:
Unformatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Schmale Charakter
Original:
Narrow character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bekommt einen Charakter aus einem Datei-Stream
Original:
gets a character from a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
erhält eine Zeichenkette aus einem Datei-Stream
Original:
gets a character string from a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Schreibt ein Zeichen in einem Datei-Stream
Original:
writes a character to a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
schreibt eine Zeichenkette in einer Datei-Stream
Original:
writes a character string to a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
liest ein Zeichen aus stdin
Original:
reads a character from stdin
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
liest eine Zeichenkette aus stdin
Original:
reads a character string from stdin
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Schreibt ein Zeichen in stdout
Original:
writes a character to stdout
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
schreibt eine Zeichenkette stdout
Original:
writes a character string to stdout
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
setzt ein Zeichen zurück in ein Datei-Stream
Original:
puts a character back into a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Wide character
Original:
Wide character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
erhält eine breite Zeichen aus einem Datei-Stream
Original:
gets a wide character from a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
erhält eine breite Zeichenfolge aus einem Datei-Stream
Original:
gets a wide string from a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
schreibt eine breite Zeichen in eine Datei-Stream
Original:
writes a wide character to a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
schreibt ein breites String in eine Datei-Stream
Original:
writes a wide string to a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
liest eine breite Zeichen aus stdin
Original:
reads a wide character from stdin
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
schreibt eine breite Zeichen stdout
Original:
writes a wide character to stdout
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
stellt eine breite Zeichen zurück in ein Datei-Stream
Original:
puts a wide character back into a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Formatierte Eingabe / Ausgabe
Original:
Formatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Narrow / Multibyte-Zeichens
Original:
Narrow/multibyte character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
liest formatierten Eingaben von stdin, eine Datei-Strom oder einen Puffer
Original:
reads formatted input from stdin, a file stream or a buffer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
(C++11)
(C++11)
(C++11)
liest formatierte Eingabe von stdin, ein Datei-Stream oder ein buffer
mit variabler Argumentliste
Original:
reads formatted input from stdin, a file stream or a buffer
using variable argument list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Drucke formatiert Ausgabe an stdout, eine Datei-Strom oder einen Puffer
Original:
prints formatted output to stdout, a file stream or a buffer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Drucke formatierte Ausgabe auf stdout, ein Datei-Stream oder ein buffer
mit variabler Argumentliste
Original:
prints formatted output to stdout, a file stream or a buffer
using variable argument list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Wide character
Original:
Wide character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
liest formatierten breiten Zeicheneingabe von stdin, eine Datei-Strom oder einen Puffer
Original:
reads formatted wide character input from stdin, a file stream or a buffer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
(C++11)
(C++11)
(C++11)
liest formatierte breite Zeicheneingabe von stdin eine Datei stream
oder einen Puffer mit variabler Argumentliste
Original:
reads formatted wide character input from stdin, a file stream
or a buffer using variable argument list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Drucke formatiert Breitzeichen Ausgang stdout, ein Datei-Stream oder einen Puffer
Original:
prints formatted wide character output to stdout, a file stream or a buffer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Drucke formatiert Breitzeichen Ausgang stdout eine Datei stream
oder einen Puffer mit variabler Argumentliste
Original:
prints formatted wide character output to stdout, a file stream
or a buffer using variable argument list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Datei Positionierung
Original:
File positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
liefert die aktuelle Position in der Datei-Anzeige
Original:
returns the current file position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
erhält die Datei Stellungsanzeige
Original:
gets the file position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
verschiebt die Datei Positionsanzeiger zu einer bestimmten Position in einer Datei
Original:
moves the file position indicator to a specific location in a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
verschiebt die Datei Positionsanzeiger zu einer bestimmten Position in einer Datei
Original:
moves the file position indicator to a specific location in a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
verschiebt die Datei Stellungsanzeige zum Anfang in einer Datei
Original:
moves the file position indicator to the beginning in a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Fehlerbehandlung
Original:
Error handling
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
löscht Fehler
Original:
clears errors
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Prüfungen für die End-of-Datei
Original:
checks for the end-of-file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Prüfungen für eine Datei Fehler
Original:
checks for a file error
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
zeigt eine Zeichenfolge entspricht der aktuellen Fehler stderr
Original:
displays a character string corresponding of the current error to stderr
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
Operationen auf Dateien
Original:
Operations on files
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
löscht eine Datei
Original:
erases a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
benennt eine Datei
Original:
renames a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
erstellt und öffnet eine temporäre, automatische Entfernen Datei
Original:
creates and opens a temporary, auto-removing file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]
gibt einen eindeutigen Dateinamen
Original:
returns a unique filename
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Funktion)[edit]

[Bearbeiten]Types

definiert in Header <cstdio>
Type
Original:
Type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
FILE
Art, halten können alle erforderlichen Informationen, um eine CI / O-Stream steuern
Original:
type, capable of holding all information needed to control a C I/O stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
fpos_t
Typ, der fähig eindeutigen Spezifizieren einer Position in einem Bild
Original:
type, capable of uniquely specifying a position in a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten]Makros

definiert in Header <cstdio>
stdin
stdout
stderr
Ausdruck des Typs FILE* mit dem Eingang stream
expression vom Typ FILE* mit dem Ausgang stream
expression vom Typ FILE* mit der Fehlerausgabe-Stream zugeordnet zugeordnet
Original:
expression of type FILE* associated with the input stream
expression of type FILE* associated with the output stream
expression of type FILE* associated with the error output stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Makro konstant)
EOF
Ganzzahlkonstantenausdruck vom Typ int und negativen Wert
Original:
integer constant expression of type int and negative value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Makro konstant)
FOPEN_MAX
Anzahl der Dateien, die gleichzeitig geöffnet sein können
Original:
number of files that can be open simultaneously
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Makro konstant)
FILENAME_MAX
Größe für ein Array von char die längste unterstützt Dateinamen zu halten benötigt
Original:
size needed for an array of char to hold the longest supported file name
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Makro konstant)
BUFSIZ
Größe des Puffers durch std::setbuf verwendet
Original:
size of the buffer used by std::setbuf
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Makro konstant)
_IOFBF
_IOLBF
_IONBF
Argument std::setbuf für vollständig I / O
argument um std::setbuf Angabe zeilengepufferte gepufferte I / O
argument um std::setbuf Angabe unbuffered I / O
Original:
argument to std::setbuf indicating fully buffered I/O
argument to std::setbuf indicating line buffered I/O
argument to std::setbuf indicating unbuffered I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Makro konstant)
SEEK_SET
SEEK_CUR
SEEK_END
Argument std::fseek Angabe sucht ab Anfang des file
argument um std::fseek Angabe sucht aus der aktuellen Datei position
argument um std::fseek anzeigt suchen ab Ende der Datei
Original:
argument to std::fseek indicating seeking from beginning of the file
argument to std::fseek indicating seeking from the current file position
argument to std::fseek indicating seeking from end of the file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Makro konstant)
TMP_MAX
maximale Anzahl der eindeutigen Dateinamen, die von std::tmpnam erzeugt werden kann
Original:
maximum number of unique filenames that can be generated by std::tmpnam
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Makro konstant)
L_tmpnam
Größe für ein Array von Zeichen benötigt, um das Ergebnis der std::tmpnam halten
Original:
size needed for an array of char to hold the result of std::tmpnam
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(Makro konstant)
close