Namensräume
Varianten
Aktionen

vscanf, vfscanf, vsscanf

Aus cppreference.com
< c‎ | io

 
 
File input/output
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
 
Defined in header <stdio.h>
int vscanf( const char *format, va_list vlist );
(1)
int vfscanf( FILE *stream, const char *format, va_list vlist );
(2)
int vsscanf( const char *buffer, const char *format, va_list vlist );
(3)
Liest Daten aus dem einer Vielzahl von Quellen, interpretiert ihn entsprechend format und speichert die Ergebnisse in Orte von vlist definiert .
Original:
Reads data from the a variety of sources, interprets it according to format and stores the results into locations defined by vlist.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Liest die Daten aus stdin
Original:
Reads the data from stdin
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Liest die Daten aus der Datei-Stream stream
Original:
Reads the data from file stream stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
Liest die Daten aus null-terminierte Zeichenkette buffer
Original:
Reads the data from null-terminated character string buffer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten] Parameter

stream -
Eingabedatei Stream zu lesen
Original:
input file stream to read from
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
buffer -
Zeiger auf einen null-terminierten Zeichenkette zu lesen
Original:
pointer to a null-terminated character string to read from
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
format -
Zeiger auf einen null-terminierten Zeichenkette angeben, wie die Eingabe zu lesen.
Der Format-String besteht aus Leerzeichen (jede einzelne Leerzeichen im Formatstring verbraucht alle verfügbaren aufeinanderfolgenden Leerzeichen am Eingang), Charaktere Nicht-Whitespace außer % (jeweils Charakter in den Format-Strings verbraucht genau eine identische Zeichen aus der Eingabe) und Umwandlung Spezifikationen. Jede Konvertierung Spezifikation hat das folgende Format:
Original:
The format string consists of whitespace characters (any single whitespace character in the format string consumes all available consecutive whitespace characters from the input), non-whitespace characters except % (each such character in the format strings consumes exactly one identical character from the input) and conversion specifications. Each conversion specification has the following format:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • einleitenden % Charakter
    Original:
    introductory % character
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (optional) Zuordnung unterdrückende Charakter *. Wenn diese Option vorhanden ist, wird die Funktion nicht berechtigt, die infolge der Umstellung auf aufnehmenden Argument .
    Original:
    (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (optional) ganze Zahl (größer als Null), der angibt, maximale Feldbreite, das heißt, die maximale Anzahl der Zeichen, dass die Funktion erlaubt ist zu konsumieren, wenn dabei die Umwandlung von der aktuellen Umstellung Spezifikation. Beachten Sie, dass% s und% [führen kann einen Pufferüberlauf, wenn die Breite nicht angegeben wird .
    Original:
    (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (optional) Länge Modifizierer, die die Größe des empfangenden Argument gibt, das heißt, die tatsächliche Zieltyp. Dies wirkt sich auf die Genauigkeit bei der Konvertierung und Überlauf Regeln. Der Standardwert Zieltyp ist für jede Conversion-Typ (siehe Tabelle unten) .
    Original:
    (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below).
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Umwandlung Formatbezeichner
    Original:
    conversion format specifier
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Die folgenden Formatangaben stehen zur Verfügung:
Original:
The following format specifiers are available:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Conversion
specifier
Explanation Argument type
length modifier hh h (none) l ll j z t L
% matches literal % N/A N/A N/A N/A N/A N/A N/A N/A N/A
c matches a single character N/A N/A
char*
wchar_t*
N/A N/A N/A N/A N/A
s matches a character string (a sequence of non-whitespace characters)
[set]
entspricht eine nicht-leere Folge von Zeichen aus set von Zeichen .
Original:
matches a non-empty sequence of character from set of characters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Wenn das erste Zeichen des Satzes ist ^, dann werden alle Zeichen nicht in dem Satz aufeinander abgestimmt sind. Wenn der Satz beginnt mit ] oder ^] dann ] Zeichen wird ebenfalls in dem Satz enthalten .
Original:
If the first character of the set is ^, then all characters not in the set are matched. If the set begins with ] or ^] then the ] character is also included into the set.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
d
Am besten für einen 'Dezimalzahl' .
Original:
matches a decimal integer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Das Format der Zahl ist die gleiche wie von strtol() mit dem Wert für die 10 base Argument erwartet
Original:
The format of the number is the same as expected by strtol() with the value 10 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
signed char* or unsigned char*
signed short* or unsigned short*
signed int* or unsigned int*
signed long* or unsigned long*
signed long long* or unsigned long long*
N/A
i
Am besten für einen 'Dezimalzahl' .
Original:
matches a decimal integer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Das Format der Zahl ist die gleiche wie von strtol() mit dem Wert für die 0 base Argument erwartet
Original:
The format of the number is the same as expected by strtol() with the value 0 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
u
Am besten für einen 'vorzeichenlose Dezimalzahl' .
Original:
matches a unsigned decimal integer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Das Format der Zahl ist die gleiche wie von strtoul() mit dem Wert für die 0 base Argument erwartet
Original:
The format of the number is the same as expected by strtoul() with the value 0 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
o
Findet eine 'Oktal Integer' .
Original:
matches an octal integer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Das Format der Zahl ist die gleiche wie von strtol() mit dem Wert für die 8 base Argument erwartet
Original:
The format of the number is the same as expected by strtol() with the value 8 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
x
Findet eine 'hexadezimale Ganzzahl' .
Original:
matches an hexadecimal integer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Das Format der Zahl ist die gleiche wie von strtol() mit dem Wert für die 16 base Argument erwartet
Original:
The format of the number is the same as expected by strtol() with the value 16 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
n
Gibt die 'Anzahl der gelesenen Zeichen so weit' .
Original:
returns the number of characters read so far.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Keine Eingabe verbraucht wird. Nicht erhöht die Zuordnung zählen. Wenn die Angabe muss assignment-Unterdrückung Operator definiert, ist das Verhalten undefiniert
Original:
No input is consumed. Does not increment the assignment count. If the specifier has assignment-suppressing operator defined, the behavior is undefined
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
a, A
e, E
f, F
g, G
Am besten für einen 'Gleitkommazahl' .
Original:
matches a floating-point number.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Das Format der Zahl ist die gleiche wie von strtof() erwartet
Original:
The format of the number is the same as expected by strtof()
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/A N/A
float*
double*
N/A N/A N/A N/A
long double*
p
entspricht Implementierung definiert Zeichenfolge Definition eines 'Zeiger' .
Original:
matches implementation defined character sequence defining a pointer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
printf Familie von Funktionen sollten das gleiche Sequenz mit %p Formatbezeichner
Original:
printf family of functions should produce the same sequence using %p format specifier
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/A N/A
void**
N/A N/A N/A N/A N/A N/A
Original:
pointer to a null-terminated character string specifying how to read the input.
Der Format-String besteht aus Leerzeichen (jede einzelne Leerzeichen im Formatstring verbraucht alle verfügbaren aufeinanderfolgenden Leerzeichen am Eingang), Charaktere Nicht-Whitespace außer % (jeweils Charakter in den Format-Strings verbraucht genau eine identische Zeichen aus der Eingabe) und Umwandlung Spezifikationen. Jede Konvertierung Spezifikation hat das folgende Format:
Original:
The format string consists of whitespace characters (any single whitespace character in the format string consumes all available consecutive whitespace characters from the input), non-whitespace characters except % (each such character in the format strings consumes exactly one identical character from the input) and conversion specifications. Each conversion specification has the following format:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • einleitenden % Charakter
    Original:
    introductory % character
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (optional) Zuordnung unterdrückende Charakter *. Wenn diese Option vorhanden ist, wird die Funktion nicht berechtigt, die infolge der Umstellung auf aufnehmenden Argument .
    Original:
    (optional) assignment-suppressing character *. If this option is present, the function does not assign the result of the conversion to any receiving argument.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (optional) ganze Zahl (größer als Null), der angibt, maximale Feldbreite, das heißt, die maximale Anzahl der Zeichen, dass die Funktion erlaubt ist zu konsumieren, wenn dabei die Umwandlung von der aktuellen Umstellung Spezifikation. Beachten Sie, dass% s und% [führen kann einen Pufferüberlauf, wenn die Breite nicht angegeben wird .
    Original:
    (optional) integer number (greater than zero) that specifies maximum field width, that is, the maximum number of characters that the function is allowed to consume when doing the conversion specified by the current conversion specification. Note that %s and %[ may lead to buffer overflow if the width is not provided.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • (optional) Länge Modifizierer, die die Größe des empfangenden Argument gibt, das heißt, die tatsächliche Zieltyp. Dies wirkt sich auf die Genauigkeit bei der Konvertierung und Überlauf Regeln. Der Standardwert Zieltyp ist für jede Conversion-Typ (siehe Tabelle unten) .
    Original:
    (optional) length modifier that specifies the size of the receiving argument, that is, the actual destination type. This affects the conversion accuracy and overflow rules. The default destination type is different for each conversion type (see table below).
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • Umwandlung Formatbezeichner
    Original:
    conversion format specifier
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Die folgenden Formatangaben stehen zur Verfügung:
Original:
The following format specifiers are available:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Conversion
specifier
Explanation Argument type
length modifier hh h (none) l ll j z t L
% matches literal % N/A N/A N/A N/A N/A N/A N/A N/A N/A
c matches a single character N/A N/A
char*
wchar_t*
N/A N/A N/A N/A N/A
s matches a character string (a sequence of non-whitespace characters)
[set]
entspricht eine nicht-leere Folge von Zeichen aus set von Zeichen .
Original:
matches a non-empty sequence of character from set of characters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Wenn das erste Zeichen des Satzes ist ^, dann werden alle Zeichen nicht in dem Satz aufeinander abgestimmt sind. Wenn der Satz beginnt mit ] oder ^] dann ] Zeichen wird ebenfalls in dem Satz enthalten .
Original:
If the first character of the set is ^, then all characters not in the set are matched. If the set begins with ] or ^] then the ] character is also included into the set.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
d
Am besten für einen 'Dezimalzahl' .
Original:
matches a decimal integer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Das Format der Zahl ist die gleiche wie von strtol() mit dem Wert für die 10 base Argument erwartet
Original:
The format of the number is the same as expected by strtol() with the value 10 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
signed char* or unsigned char*
signed short* or unsigned short*
signed int* or unsigned int*
signed long* or unsigned long*
signed long long* or unsigned long long*
N/A
i
Am besten für einen 'Dezimalzahl' .
Original:
matches a decimal integer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Das Format der Zahl ist die gleiche wie von strtol() mit dem Wert für die 0 base Argument erwartet
Original:
The format of the number is the same as expected by strtol() with the value 0 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
u
Am besten für einen 'vorzeichenlose Dezimalzahl' .
Original:
matches a unsigned decimal integer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Das Format der Zahl ist die gleiche wie von strtoul() mit dem Wert für die 0 base Argument erwartet
Original:
The format of the number is the same as expected by strtoul() with the value 0 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
o
Findet eine 'Oktal Integer' .
Original:
matches an octal integer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Das Format der Zahl ist die gleiche wie von strtol() mit dem Wert für die 8 base Argument erwartet
Original:
The format of the number is the same as expected by strtol() with the value 8 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
x
Findet eine 'hexadezimale Ganzzahl' .
Original:
matches an hexadecimal integer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Das Format der Zahl ist die gleiche wie von strtol() mit dem Wert für die 16 base Argument erwartet
Original:
The format of the number is the same as expected by strtol() with the value 16 for the base argument
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
n
Gibt die 'Anzahl der gelesenen Zeichen so weit' .
Original:
returns the number of characters read so far.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Keine Eingabe verbraucht wird. Nicht erhöht die Zuordnung zählen. Wenn die Angabe muss assignment-Unterdrückung Operator definiert, ist das Verhalten undefiniert
Original:
No input is consumed. Does not increment the assignment count. If the specifier has assignment-suppressing operator defined, the behavior is undefined
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
a, A
e, E
f, F
g, G
Am besten für einen 'Gleitkommazahl' .
Original:
matches a floating-point number.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Das Format der Zahl ist die gleiche wie von strtof() erwartet
Original:
The format of the number is the same as expected by strtof()
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/A N/A
float*
double*
N/A N/A N/A N/A
long double*
p
entspricht Implementierung definiert Zeichenfolge Definition eines 'Zeiger' .
Original:
matches implementation defined character sequence defining a pointer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
printf Familie von Funktionen sollten das gleiche Sequenz mit %p Formatbezeichner
Original:
printf family of functions should produce the same sequence using %p format specifier
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
N/A N/A
void**
N/A N/A N/A N/A N/A N/A
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
vlist -
variable Argumentliste mit den empfangenden Argumente
Original:
variable argument list containing the receiving arguments
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Rückgabewert

Anzahl von Argumenten erfolgreich gelesen oder EOF, wenn Fehler auftritt .
Original:
Number of arguments successfully read, or EOF if failure occurs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten] Beispiel

[Bearbeiten] Siehe auch

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]
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]
C++ documentation for vscanf, vfscanf, vsscanf